How can we change the default size table in GUIDE?

1 view (last 30 days)
In my GUI, I want table of size 2x2. But the default size of table in GUIDE is 4x2. How can I change this default size?

Accepted Answer

Geoff Hayes
Geoff Hayes on 3 Aug 2015
Shil - in the OpeningFcn of your GUI, just set the Data property of the uitable to be a 2x2 cell array. Something like the following should work
% --- Executes just before untitled is made visible.
function myGUI_OpeningFcn(hObject, eventdata, handles, varargin)
% Choose default command line output for untitled
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% set the table size to be 2x2
set(handles.uitable1,'Data',cell(2,2));
The above was tested with R2014a.

More Answers (0)

Categories

Find more on Migrate GUIDE Apps in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!