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

2 views (last 30 days)
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 Comments
dpb
dpb on 8 Jul 2013
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?

Sign in to comment.

Answers (1)

dpb
dpb on 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
>>

Categories

Find more on Migrate GUIDE Apps 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!