Azzera filtri
Azzera filtri

Embedding a uicontrol listbox in a uimenu?

2 visualizzazioni (ultimi 30 giorni)
Benjamin Levy
Benjamin Levy il 30 Nov 2017
Risposto: Elizabeth Reese il 4 Dic 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

Risposte (1)

Elizabeth Reese
Elizabeth Reese il 4 Dic 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.

Categorie

Scopri di più su Migrate GUIDE Apps in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by