How to change text on a panel?
5 views (last 30 days)
Show older comments
My question is:
-I have created a panel with text in it :
uicontrol(handles.vehicleData, 'Style','text','Position', [148 -12 87 100], 'String',a,'FontSize',11);
-The variable a updates new values every time.
-Now I want to change the text in the panel without using the command uicontrol again. How can I do this?
0 Comments
Accepted Answer
Rik
on 6 Feb 2019
You can use the handle:
%create text field
a='0';
h_txt=uicontrol(handles.vehicleData, 'Style','text','Position', [148 -12 87 100], 'String',a,'FontSize',11);
%change text
a='1';
set(h_txt,'String',a)
2 Comments
More Answers (0)
See Also
Categories
Find more on Migrate GUIDE Apps in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!