How can I build a menu like this?

1 Ansicht (letzte 30 Tage)
Daniel Fonsêca
Daniel Fonsêca am 16 Jan. 2019
Kommentiert: Walter Roberson am 21 Jan. 2019
mm.png
Hi!!! I want to build a menu with this links. How can I do?
  3 Kommentare
Daniel Fonsêca
Daniel Fonsêca am 16 Jan. 2019
I want to build a menu with links using the guide and program. I want to use that instead a button.
Daniel Fonsêca
Daniel Fonsêca am 16 Jan. 2019
I want when the user click on the word, the menu shows a text. I don't know how to do the words work that form.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Jan
Jan am 16 Jan. 2019
If you create a popup menu in GUIDE, selecting a row will call the corresponding callback. Then you can start what ever you want inside this callback based on the selection. You cannot insert a link directly into the popup menu. Example:
function testGUI
FigH = figure;
uicontrol('Style', 'popupmenu', ...
'String', {'1', '2', '3'}, ...
'Callback', @myCallback);
end
function myCallback(objectH, EventData)
Str = get(objectH, 'String');
Value = get(objectH, 'Value');
Selected = Str{Value};
disp(Selected); % Or whatever you want to do
end
So your callback can contain the code to open a specific file in the help browser or web browser.
  5 Kommentare
Jan
Jan am 21 Jan. 2019
So you have an uipanel and written some text to it. This can be done by creating an axes and using text, or by a uicontrol with the style 'text'. With these methods you cannot create active links.
Walter Roberson
Walter Roberson am 21 Jan. 2019
If you use a URL with URI of matlab: then the given string is executed in MATLAB, and can include calls that activate menus.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Migrate GUIDE Apps finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by