how to manage the toggle button?

7 ビュー (過去 30 日間)
Jihad Chamseddine
Jihad Chamseddine 2014 年 7 月 8 日
コメント済み: Jihad Chamseddine 2014 年 7 月 9 日
Hi ,I am using a toggle button, AND I want when i click on the toggle button a push button will appear. and also i want that as long as I keep clicking on the toggle button, so other push buttons will be created. SO the first click on the toggle button, a pushbutton1 will appear , then a second click on the same toggle button, a pushbutton2 will appear etc..... hope you can help me
  1 件のコメント
Image Analyst
Image Analyst 2014 年 7 月 8 日
Why a toggle button? What's a toggle button anyway? You mean like a blender-style button in a button group? Why not just use a regular pushbutton?

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

回答 (1 件)

Vijay Nahar
Vijay Nahar 2014 年 7 月 9 日
A togglebutton selects either one of two states. You could use a pushbutton, resetting it back after each press.
set(handles.pushbutton1,'value',1); % set to the on state
set(handles.pushbutton1,'value',0); % set to the off state.
You could set up an IF statement to check if the 'value' of the pushbutton changes to 1. If it does, then use uicontrol to draw a new pushbutton and reset the value of the original pushbutton to 0.
  3 件のコメント
Image Analyst
Image Analyst 2014 年 7 月 9 日
Again, why not just use a normal pushbutton???
Jihad Chamseddine
Jihad Chamseddine 2014 年 7 月 9 日
ok i am using a normal push button now, so can you give me an example on how to do it with the push button because I'm a little bit lost

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

カテゴリ

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