Uitables and widgets question

조회 수: 11 (최근 30일)
James Hendren
James Hendren 2013년 6월 25일
I have 2 questions.
1) Can checkboxes be implemented into the UItable when building a gui.
2) If so, can rows and checkboxes be added dynamically to the UItable.

채택된 답변

Tom
Tom 2013년 6월 25일
편집: Tom 2013년 6월 25일
1) Yes
2) Yes
you can change the column format of the table at any point, using the ColumnFormat field of the uitable:
T = uitable('Data',{'a',false;'b' true},...
'ColumnFormat',{[] , 'numeric'},...
'ColumnEditable',[false true]);
pause(1)
set(T,'ColumnFormat',{[],'logical'})

추가 답변 (4개)

James Hendren
James Hendren 2013년 6월 25일
Is your sample for question 1 or 2?
  댓글 수: 1
Tom
Tom 2013년 6월 25일
편집: Tom 2013년 6월 25일
2 I suppose, it's not specific to GUIDE - you can run it in the command line or paste it into a script and run it. It shows a table being created, and then the second column being converted from numeric data to logical checkboxes.

댓글을 달려면 로그인하십시오.


James Hendren
James Hendren 2013년 6월 25일
I am not getting checkboxes when I run it

James Hendren
James Hendren 2013년 6월 25일
I meant literal checkboxes from the GUIDE program
  댓글 수: 14
James Hendren
James Hendren 2013년 6월 25일
I have, but there is alot left out from the guide. For instance, I could not insert a checkbox into the table. Is there another source you would suggest?
Tom
Tom 2013년 6월 25일
To do it in GUIDE, you right click on the table, select Table Property Editor, then in the Columns tab there is an option to select what data format each column will take: make it 'logical'.

댓글을 달려면 로그인하십시오.


James Hendren
James Hendren 2013년 6월 26일
Also, how could I install another push button "Remove Row" to delete all new created rows. Is there a way to implement add/remove buttons with GUIDE?

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by