I have a uitable with 6 row and 6 column and i want to show it in full screen mode for doing this i can change column width but i can't change row height.
Extent is Size of uitable rectangle, but it is read only properties.

- 25,078
- 11
- 68
- 113

- 302
- 1
- 4
- 12
-
2do you want to increase the font size as well? – Robert Seifert Dec 14 '13 at 01:04
2 Answers
With conventional approaches the only possibility to change the row height is by adjusting the 'FontSize'
property.
The following function will give you a full-screen table. You can set up 'ColumnWidth'
and 'FontSize'
until it fills your screen entirely.
function fancyTable
columnwidth = { 1920/2 1920/2 };
FontSize = 135;
h = figure('units','normalized','Position',[0 0 1 1],...
'numbertitle','off','MenuBar','none');
defaultData = rand(5,2);
uitable(h,'Units','normalized','Position',[0 0 1 1],...
'Data', defaultData,...
'ColumnName', [],'RowName',[],...
'ColumnWidth', columnwidth,...
'FontSize', FontSize,...
'ColumnEditable', [false false],...
'ColumnFormat', {'numeric' , 'numeric'});
end
I don't see a simple solution to change the row-height independently from the font size.
But there are some ideas at undocumented Matlab.
" 7. JIDE customizations ... Similarly, this section explains how we can use JIDE to merge together adjacent cells: "
Could be a fiddly workaround, and there are no code-examples.

- 25,078
- 11
- 68
- 113
You can e.g. use the findjobj
utility from the file exchange.
It will get you to the underlying java object of the table, somewhere along the lines of:
t = uitable(...);
scrollPane = findjobj(t);
% not 100% sure about this, but there'll be a `UITablePeer` object somewhere within that scrollPane
jTable = scrollPane.getComponent(0);
This jTable
will have a setRowHeight
method inherited from http://docs.oracle.com/javase/7/docs/api/javax/swing/JTable.html

- 9,526
- 26
- 54