MATLAB Answers

0

How do you display calculated values in uitable without using set(handle​s.uitable,​'data',val​ue)?

Cordelle 님이 질문을 제출함. 8 Jul 2013
I created a GUI using GUIDE that consists of a 7X3 table (uitable1) and a pushbutton (Calculate). The pushbutton places 7 calculated values into the first column of uitable1.
I would like to place those values into the first column of uitable1 without using set(handles,'data',value) because after the calculations are made, I still would like to edit the second column of uitable1. However, because I used set(handles,'data',value),I cannot edit the 2nd and 3rd columns of uitable1.
Essentially, I would like to display the calculated values in the table without actually setting it using set(handles,'data',value)
Thanks in advance,
Cordelle

  댓글 수: 2

No can do...there's nothing to display if there's no value in the 'data' property.
You can let the user edit the data, though, set the 'columnEditable' logic array True for those which are to be user-changeable.
You'll have to write all the callback stuff, etc., etc., ...
Perhaps it should be an edit box instead? Or use an edit box first, then the uitable?
how do i set the 'columnEditable' logic array?

로그인 to comment.

답변 수: 1

dpb 님의 답변 9 Jul 2013

MATL
>> help uitable
uitable creates a two dimensional graphic table component.
uitable creates a table component using default property values in
the current figure window. If no figure exists, one will be created.
uitable('PropertyName1',value1,'PropertyName2',value2,...) creates a
uitable object with specified property values. MATLAB uses default
property values for any property that is not specified.
...
Execute GET(H), where H is a uitable handle, to see the list of uitable
object properties and their current values.
...
Execute SET(H) to see the list of uitable object properties that can be
set and their legal property values.
...
See also figure, inspect, format, sprintf, uicontrol, uimenu, uipanel
Reference page in Help browser
doc uitable
>>

  댓글 수: 0

로그인 to comment.



Translated by