Generating a new pushbutton on button press
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi,
I am attempting to create a basic multiple choice RPG using guide. To get round using multiple GUIs, i thought a good way of doing this would be on buttonpress. creating an almost identical button in the same place as the old one, how would one go about attempting this?
0 commentaires
Réponse acceptée
Jan
le 28 Déc 2018
Modifié(e) : Jan
le 28 Déc 2018
While I do not know, what a "mutliple choice RPG" is, and " doing this would be on buttonpress" is not clear also, modifying a button is easy:
figure;
handles.ButtonH = uicontrol('Style', 'PushButton', 'String', 'Text 1');
pause(1);
handles.ButtonH.String = 'Text 2';
pause(2)
handles.ButtonH.String = 'Text 3';
... etc.
So simply modify the property you want to change. If you have a different number of buttons, you can hide a button by setting its property 'Visible' to 'off' also.
0 commentaires
Plus de réponses (0)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!