I have an app with UITable. During operation I import data to the table with ~350 rows. See image attached.
There is way more data than displayed, but the vertical scrollbar is not showing.
Sometimes I can use the scroll wheel to browse downward but it typically stops scrolling around 100-130 rows; I can never see the bottom of the data.
If I select a cell and use the down arrow it will walk down offscreen and back as if the table is fine… just not scrolling. Same for page down/up – the selected cell changes but scrolling does not follow.
The issue may be related to the creation code but I have yet to find the flaw… I've pasted the code below.
function handles = CreateTabbedPanels(handles) %Create tab group
handles.tgroup = uitabgroup('Parent', handles.figure1,'TabLocation', 'top'); handles.tab1 = uitab('Parent', handles.tgroup, 'Title', 'Pressure Plots'); handles.tab2 = uitab('Parent', handles.tgroup, 'Title', 'Data Table'); %Place panels into each tab
handles.P1 = uipanel(handles.tab1); handles.P2 = uipanel(handles.tab2); %Reposition each panel to same location as panel 1
set(handles.P2,'position',get(handles.P1,'position')); % Create Tab 1 items
handles.ax1 = subplot(1,1,1,'Parent',handles.P1); % Create Tab 2 items - Create a data table
VarNames = {'Pressure','PumpEncoder','ZEncoder', ... 'ZEncValid', 'PressureSlope','SlopeFault','PressureFault'}; T = cell2table(cell(500,7), ... 'VariableNames', VarNames); handles.uit1 = uitable('Data',T{:,:},'ColumnName',T.Properties.VariableNames,... 'Units', 'Normalized', 'ForegroundColor', [0,0,0], ... 'BackgroundColor',[0.9,0.9,0.9;0.82,0.82,0.82], ... 'FontSize', 10, ... %'FontWeight','bold', ... 'Position',[0, 0, 1, 1], ... 'Parent',handles.P2); % Place in upper left
handles.uit1.Position = [0, 1-handles.uit1.Extent(4)-10, ... handles.uit1.Extent(3)+10,handles.uit1.Extent(4)+10]; end
Best Answer