Info

此问题已关闭。 请重新打开它进行编辑或回答。

Question about Push Button..

1 次查看(过去 30 天)
Jihad Chamseddine
关闭: MATLAB Answer Bot 2021-8-20
I am dealing now with pushbuttons in matlab and I just want to know if I have a pushbutton and I want to use it as a button to add layers so when I click on it there will be layers added as much as I want (layers or another push buttons it doesnt matter) , so how could this be done?
  3 个评论
Joseph Cheng
Joseph Cheng 2014-7-2
Are you asking if there is a tabbed type of GUI interface? by push of a button you are looking at a different "layer?" "tab"?
Jihad Chamseddine
编辑:Image Analyst 2014-7-2
I want that when I click on the push button, another push button appears as a result of that. I hope you can help me, guys. This means that when I click on the push button, another push button will be created. I hope that this can be done.
Actually to understand better, I have a push button called "Add Layer that deals with the project I'm doing". So what I need is that when I click on the "Add layer..." push button, another button appears, so that I can obtain additional buttons by clicking on the "Add layer" push button.

回答(2 个)

Joseph Cheng
Joseph Cheng 2014-7-2
No clue why you would do this but you can create a pushbutton to start with with a callback that creates eval() a creation of push button. the pushbutton callback would need to take in the current position of the pushed button so you would offset the new button.

Image Analyst
Image Analyst 2014-7-2
In the "Add layers" pushbuton callback, call the uicontrol() function to create additional pushbuttons. You will need to specify the tag, string, and position properties, at a minimum.

此问题已关闭。

标签

Community Treasure Hunt

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

Start Hunting!

Translated by