Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Assign a value to a static text in GUI MATLAB

How can I assign a value to a static text in a MATLAB GUI?

like image 375
Achraf Avatar asked May 27 '10 20:05

Achraf


People also ask

How do I display a message in MATLAB GUI?

f = msgbox( message , title ) specifies the title of the message box. f = msgbox( message , title , icon ) specifies a predefined icon to display in the message dialog box.

How do you create a tab in MATLAB app designer?

t = uitab creates a tab inside a tab group and returns the Tab object. If there is no tab group available, MATLAB® calls the figure function to create a figure. Then it creates a tab group in that figure and places the tab inside the tab group.

How do you change text in MATLAB?

Specify the font name and style using font preferences. On the Home tab, in the Environment section, click Preferences. Select MATLAB > Fonts and, in the Desktop code font section, select a font name and style.


1 Answers

Double click on your text in guide to open the property editor, then edit the 'String' property. You can also set the 'Tag' property so you can edit it while your GUI is running. If you set your tag to mytext, you can change the static text to 'MyString' with the following line:

set(handles.mytext,'String','MyString')
like image 191
Doresoom Avatar answered Sep 28 '22 03:09

Doresoom