Create another pushbutton and/or textbox after pressing a pushbutton
1 view (last 30 days)
Show older comments
Hello I'm Brilly. I'm new to Matlab GUI.
I'm not using GUIDE. My question is about this :
I created 1 textbox as an input box (integer) and 1 pushbutton that acts as an "OK" button.
What I want is when user input a number n and press the "OK", then n textboxes + 1 pushbutton (another "OK" button) will appear.
I don't understand the PDF given here about GUI, so I searched in youtube and learnt that I need to use something like this when creating the first "OK" button after the first textbox ("parameter"):
var=uicontrol('style','pushbutton','string','OK',{@fun,parameter});
and then I must somehow use the function "fun" to create the n textboxes and another "OK" pushbutton.
I did it. But then I couldn't further use the n textboxes as input boxes.
I also wanted to take the integer in "parameter" but couldn't do that.
Was I making mistake in creating the "fun" function? It seems like a simple problem but I'm new so can't do much. Hope anybody can help. Thank you very much.
1 Comment
Jan
on 26 Apr 2015
The important details are hidden in the message: "I did it. But then I couldn't further use the n textboxes as input boxes". Please post the code and explain, why you cannot use the results.
Was I making mistake in creating the "fun" function?
Perhaps. So please post this function to give us a chance to find problems.
Add the new information by editing the original question, because posting required details as comments does not allow for readers to get a overview directly.
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!