Tieing a pop-up menu to a push button

I have 2 pushbuttons and 2 pop-up menus.
I want to tie pushbutton 1 to pop-up menu 1 and pushbutton 2 to pop-up menu 2.
I only want the user to be able to choose one or the other pushbuttons.
I then want the different names in their respective pop-up menus to link to separate GUIs.
I have tried to breakdown the GUI example used in the help section to no avail.

4 Comments

You say you want to tie the buttons to particular pop-up menus, but what does that mean? The user pushes the first button and what should happen? The appropriate popup becomes enabled (and the other one disabled)? The appropriate popup becomes visible (and the other one invisible)? Would it be acceptable to use a single popup whose contents and results were set by the pushbutton?
Hi Walter and thanks for the fast reply.
When one push button is pressed, I want the alternative button disabled along with its relevant pop-up box values.
This could possibly be achieved using one pop-up box provided that when that pushbutton is selected, the pop-up box will list only GUI shortcuts (say GUIs a and b) for the user to select.
Then when the other pushbutton is selected, only GUI shortcuts c and d will be listed for user selection.
I did not consider different shortcuts in a single pop-up box which was specified by the pushbuttons.
I have since found the below comment.
Is this applicable for a single selection pushbutton?
*See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one % instance to run (singleton)".
Jay
Jay on 19 Dec 2015
Edited: Jay on 19 Dec 2015
I have progressed to the comprehension that I want to have a primary pop-up box with two headings. Eg. AM and PM
The secondary pop-up box (which will depend on the parents pop-up box selection) will be:
AM: 'Twenty Four','Three', 'Six' or 'Nine' PM: 'Twelve', 'Fifteen', 'Eighteen' or 'Twenty One'
to no avail.

Sign in to comment.

Answers (0)

Categories

Asked:

Jay
on 16 Dec 2015

Edited:

Jay
on 19 Dec 2015

Community Treasure Hunt

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

Start Hunting!