フィルターのクリア

How do I, from choosing a string from a pop-up menu, make a edit box disable?

1 回表示 (過去 30 日間)
Mikkel
Mikkel 2012 年 6 月 26 日
Hi
Ive been looking for a guide to how to make a gui pop-up menu make one of my edit box disable?
Seen alot of good guides with a push button, but I need one for a pop-up menu.
Il'l try to make a image of what i need.
(Pop-up menu) | Edit 1 | | Edit 2 |
if I in pop-up menu pick option 1, I want edit box 2 to be disablet. And if i pick option 2, i want edit box 1 to be disablet.
How do I do that?
MIkkel Ibsen

採用された回答

Walter Roberson
Walter Roberson 2012 年 6 月 26 日
idx = get( hObject, 'Value')
switch idx
case 1: set( handles.Editbox1, 'Enable', 'off');
case 2: set( handles.Editbox2, 'Enable', 'off');
end
  7 件のコメント
Walter Roberson
Walter Roberson 2012 年 6 月 27 日
At the command line, command
dbstop if error
Then run your program. When it stops, examine
fieldnames(handles)
Check the names carefully. For example is it "editbox1" (with lower-case) in the handles structure ?
Mikkel
Mikkel 2012 年 6 月 28 日
Instead of me trying a million things and not getting anywhere, could you make a simple gui with 1 pop-up menu and 2 edit boxes, and just make them do what I would like to do, and then send the files to mikkel-ibsen@hotmail.com
Would really really really appreciate it :)

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by