Panel GUI change content

8 vues (au cours des 30 derniers jours)
Nasiha Husni
Nasiha Husni le 29 Juin 2016
Commenté : Nasiha Husni le 29 Juin 2016
Hi good morning,
I have some question according with GUI panel, how to I change the content at panel GUI once user click to another menu the contect will be change according to user selected and the previous content will be dissapear to show the new content. I don't know how to set the code can anyone help me.
I'm just set some of the menu content at panel like this:
set(handles.display,'visible','on');
set(handles.text25,'visible','on');
set(handles.MRN,'visible','on');
set(handles.OfflineDiagnosis,'visible','on');
set(handles.DiagnosisD,'visible','on');
but when I change to another content the previous can't dissapear, what should I do the code to change the content selected at Panel GUI.
thank you
  2 commentaires
Walter Roberson
Walter Roberson le 29 Juin 2016
Could you confirm that you mean uipanel and not uitable and not uitab ?
Which of the handles corresponds to a uitable (or uitab) ?
Nasiha Husni
Nasiha Husni le 29 Juin 2016
uipanel sorry about not clear about it, some of user want make selected and the content at uipanel will change immediately once they choose the content in popup menu, like popup menu 1 uipanel will change the content in popupmenu 1, when select popupmenu 2 uipanel show content in popupmenu 2

Connectez-vous pour commenter.

Réponse acceptée

Walter Roberson
Walter Roberson le 29 Juin 2016
Making some assumptions here:
set([handles.MRN, handles.OfflineDiagnosis, handles.DiagnosisD], 'visible', 'off');
Now you should set() the appropriate one of those to be 'visible', 'on' according to the menu choice.
Consider for example,
panh = [handles.MRN, handles.OfflineDiagnosis, handles.DiagnosisD];
set(panh, 'Visible', 'off');
panchoice = get(handles.listbox, 'Value'); %if the user choose one out of a listbox
set( panh(panchoice), 'Visible', 'on');
  1 commentaire
Nasiha Husni
Nasiha Husni le 29 Juin 2016
Ok I try first.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Migrate GUIDE Apps dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by