I want to have a popup menu as column format on a uitable and the popup list will be feeded by a variable. Is this possible?
1 次查看(过去 30 天)
显示 更早的评论
I have a uitbale with 6 columns. I want to have a popup menu as column format at 5th column at the uitable and the popup list will be feeded by a variable. Is this possible?
0 个评论
采纳的回答
Walter Roberson
2015-7-13
uitable() cannot read the current content of a variable to determine the popup menu to display. You need to set() the appropriate entry of the uitable ColumnFormat property to the cell array of strings that you want to use for the popup entries each time the variable changes.
popup_column = 7; %for example
col_fmt = get(MyUitable, 'ColumnFormat');
col_fmt{popup_column} = Variable_with_new_entries
set(MyUitable, 'ColumnFormat', col_fmt);
4 个评论
Walter Roberson
2015-7-13
When you specify fewer logical values than there are columns, the remaining columns are assumed to be false (not editable)
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Dialog Boxes 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!