Effacer les filtres
Effacer les filtres

Embedding a uicontrol listbox in a uimenu?

2 vues (au cours des 30 derniers jours)
Benjamin Levy
Benjamin Levy le 30 Nov 2017
I have a set of customized menu options on the toolbar of my GUI. One of the options is 'Tools', which has several submenus. I want to embed a checkbox or listbox uicontrol in the second submenu of 'Tools', so that the workflow will be... 1. Click on 'Tools' in topbar of figure. 2. Click on 'Plotting' from 'Tools'. At this point, a popup window or such should appear which allows me to select one or more features from a list (checkbox or listbox); the values selected are returned with a callback to plot the selected features on a gui handle in the main figure.
In otherwords, can I implement the uicontrol 'listbox' in the uimenu context.
Thank you.
BSL

Réponses (1)

Elizabeth Reese
Elizabeth Reese le 4 Déc 2017
It is possible to open a new dialog with the checkbox or listbox from the menu. You can do this by adding a callback to the "Plotting" option in your menu. In the callback, create your new dialog with the uicontrols that you would like to use. You can add a callback to those uicontrols and have the dialog return the values that were selected. You can read more about dialog boxes here.

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