get information from popup menu without pushbotton GUI

3 ビュー (過去 30 日間)
Kamuran
Kamuran 2016 年 1 月 20 日
コメント済み: Kamuran 2016 年 1 月 20 日
Hello, I am developing a GUI and I want an input field to be blocked for one value of the popup menu (last one) so in the opening fcn I wrote
if true
popvalue=get(handles.popmenu,'Value');
if popvalue~=7
set(handles.edit,'enable','off')
end end
Right now when the program starts editbox is not available to edit . What I want to do (if possible), if the user changes the value of the popup menu I would like to capture that without a pushbotton. Change of the popup menu value will check and update the editbox status. Or I have to do this in two steps, like a pushbotton for enabling the editbox.
  1 件のコメント
Kamuran
Kamuran 2016 年 1 月 20 日
Nevermind I found the solution ...if anybody is interested
if true
popvalue=get(handles.popmenu,'Value')
if popvalue~=7
set(handles.edit,'enable','off')
else
set(handles.edit''enable','on')
end
you put is in the callback function of popupmenu

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by