필터 지우기
필터 지우기

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

조회 수: 2 (최근 30일)
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
dpb
dpb 2013년 7월 8일
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?

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

답변 (1개)

dpb
dpb 2013년 7월 9일
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
>>

카테고리

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