Connected Pop-ups
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi, I am really new to Matlab and I am trying (need for school) to make a program as this: There will be two pop-ups. For the first pop-up I have 5 possibilities (like A, B, C, D, E), but the number of possibilities on the second pop-up depends of my choice in the first pop-up. For example, if I choose possibility A on pop-up 1 there will be possibilities F, G, H, I, J on pop up 2 and if I choose possibility B on pop-up 1 there will be possibilities Z,M,N,F for pop-up 2. What I want to know is if is it possible to make a program like this on MATLAB and, if it is, what should I look for to make it ? Thanks.
0 Kommentare
Akzeptierte Antwort
Matt Fig
am 9 Apr. 2011
Yes it is possible.
STR = {'a';'b';'c'}; % Use for popup1;
STR2 = {{'f';'g';'h'};{'i';'j';'k'};{'l';'m';'n'}}; % popup2 (after)
Now if the user selects 'a' in popup1, that is 'value' 1, so set the 'string' of popup2 to STR2{{1}}. If the user selects 'b' in popup1, that is 'value' 2, so set the 'string' of popu2 to STR2{{2}}, etc...
If you want the user not to be able to choose a value from popup2 until a choice has been made in popup1, set its 'enable' property to 'off' until the choice has been made. To do this you will have to enable popup2 and fill its string from within the callback to popup1.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Environment and Settings finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!