Connected Pop-ups

4 visualizaciones (últimos 30 días)
Ricardo
Ricardo el 9 de Abr. de 2011
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.

Respuesta aceptada

Matt Fig
Matt Fig el 9 de Abr. de 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.

Más respuestas (0)

Categorías

Más información sobre Environment and Settings en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by