1

I'm trying to build a uitable 1x2.

Cell(1,1) format is a 'logical'; Cell(1,2) is 'char'

handles.SeedTable = uitable(...
                    'ColumnName',{'Shuffle' 'Seed#'},...
                    'ColumnFormat',{'logical','char'},...
                    'ColumnEditable',[true true],...
                    'RowName',{'Seed'},...
                    'Data',[{'true'}, {'Random#'} ]);

When I run my file: When I press the checkbox to uncheck cell(1,1) nothing happens. If i do not set the cell to be true by default - all is good (i.e. remove the line:

'Data',[{'true'}, {'Random#'} 
Machavity
  • 30,841
  • 27
  • 92
  • 100
NimrodB
  • 153
  • 3
  • 13

1 Answers1

1

To make the cell editable, the last true in your code needs to go without the quotes:

handles.SeedTable = uitable(...
                    'ColumnName',{'Shuffle' 'Seed#'},...
                    'ColumnFormat',{'logical','char'},...
                    'ColumnEditable',[true true],...
                    'RowName',{'Seed'},...
                    'Data',[{true}, {'Random#'} ]);
Eitan T
  • 32,660
  • 14
  • 72
  • 109
H.Muster
  • 9,297
  • 1
  • 35
  • 46