Edit Text set "String" value constant while GUI is running..

Hi all, think about a GUI including pop-up menu, edit text and pushbutton and Pop-up menu consists of 4 rows of variables, such as A,B,C, and D. When i choose each letter from the pop-up menu, it writes double (or string) to edit text. when i click the push button, some mathematical equations calculated behind the gui.
My question is how can i set the variable constant (or Static) while the gui is running ? For example, when you choose A ,it sets 500 to editbox1 (set(handles.editbox1,'String',xxx)), but in GUi you can change the number (510 for instance) before you clicked the pushbutton. Thanks.

 採用された回答

Jan
Jan 2012 年 5 月 18 日

0 投票

You can set the "Enable" property of the UICONTROL to 'off' to block editing.

3 件のコメント

Walter Roberson
Walter Roberson 2012 年 5 月 18 日
Better is likely to set the 'Enable' property to 'disable'
Serdar
Serdar 2012 年 5 月 18 日
Ok, this works pretty good. Thanks,
Is there anyway to apply this for specific string values in popup menu. For example, A,B,C are static and the D is used as custom for this case.
Jan
Jan 2012 年 5 月 18 日
No, you cannot disable only some fields of a popup menu.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File Exchange で Characters and Strings についてさらに検索

製品

質問済み:

2012 年 5 月 18 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by