Pop-up menu option for each cell of a column for a uitable in matlab GUI

5 ビュー (過去 30 日間)
Nikhil Tamhankar
Nikhil Tamhankar 2017 年 11 月 21 日
コメント済み: Nikhil Tamhankar 2017 年 11 月 25 日
Hello. I want to have a pop-up menu option for each cell of a column for a uitable in matlab GUI, from where I can choose the cell input from a variety of string values from a list. How can I do this? Kindly explain the steps in detail as I am completely new to GUIDE programming.

回答 (1 件)

Walter Roberson
Walter Roberson 2017 年 11 月 21 日
When you construct the uitable, set the ColumnFormat property of that table to be a cell array of character vectors, one entry for each possible string.
Note: it is not possible to have a different set of strings pop up for each row in the uitable (at least not without using java): all the rows will have exactly the same possibilities.
For example,
p = uitable('ColumnEditable', [true true], 'ColumnFormat', {'numeric', {'First Choice', 'Second', 'Another'}}, 'data', {5 'Second'})
  1 件のコメント
Nikhil Tamhankar
Nikhil Tamhankar 2017 年 11 月 25 日
Thank you sir. Will try to understand your suggestion and try to implement it.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeDevelop Apps Using App Designer についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by