How can we change the default size table in GUIDE?

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

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

Tags

Asked:

on 3 Aug 2015

Commented:

on 4 Aug 2015

Community Treasure Hunt

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

Start Hunting!