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

4 views (last 30 days)
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.

Answers (1)

Walter Roberson
Walter Roberson on 21 Nov 2017
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'})

Categories

Find more on Develop Apps Using App Designer in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!