GUIDE: Updating table rows depending on popup user choice
1 回表示 (過去 30 日間)
古いコメントを表示
Dear all; this is the first time I'm using guide so this may be a really stupid question, sorry about that!
I have a popup and a table. Depending on what's the user choice in the popup, the RowName properties for the table changes. Once I'll have managed this one, then I need to add a second set of table+ popup and do exactly the same thing.
How would you accomplish that? I'm having troubles with this especially because of the nested functions I guess....
Thanks everybody!
0 件のコメント
採用された回答
Tom
2013 年 6 月 26 日
Set this for the popupmenu callback.
In the CreateFcn callback of the popupmenu, you can add some options, e.g.
set(hObject,'String',{'Option 1','Option 2'})
In the Callback of the popupmenu you can then change the table's row names based on the popupmenu selection:
val = get(hObject,'Value');
if val == 1
set(handles.uitable1,'RowName',{'One','Two','Three'})
elseif val == 2
set(handles.uitable1,'RowName',{'Alpha','Beta','Gamma'})
end
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Environment and Settings についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!