フィルターのクリア

Connected Pop-ups

1 回表示 (過去 30 日間)
Ricardo
Ricardo 2011 年 4 月 9 日
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.

採用された回答

Matt Fig
Matt Fig 2011 年 4 月 9 日
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 件)

カテゴリ

Help Center および File ExchangeInteractive Control and Callbacks についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by