How to make push buttons in GUI that are unable to be pressed until another push button is pressed?
4 ビュー (過去 30 日間)
古いコメントを表示
For Example I have 5 push buttons, the last 4 push buttons can't be pressed until the 1st push button is pressed. How can I do this? :\ Gumawo. :)
0 件のコメント
採用された回答
Walter Roberson
2013 年 8 月 28 日
When the pushbuttons are created, have the first one be set to 'enable', 'on', and the others set to 'enable', 'off'. Then in the callback for the first push button, if the circumstances are appropriate, set() 'enable', 'on' for the other 4 buttons.
0 件のコメント
その他の回答 (1 件)
Vishal Rane
2013 年 8 月 28 日
If you are using GUIDE:
When your editing your GUI, double click on the component to get the property inspector. In it, set the 'Enable' property to 'off'. Do this for all the components that you want disabled initially. You can also do this in the create callback function of the components.
Now in the Callback function of the first button, set the Enable property of the remaining four buttons to 'on'.
参考
カテゴリ
Help Center および File Exchange で Migrate GUIDE Apps についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!