Change Row Height in UITABLE
14 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
sara_game7
el 31 de Ag. de 2017
Respondida: Jiawen Liu
el 9 de Nov. de 2017
I have a uitable object and I would like to increase the row height. I have tried this code:
jscroll=findjobj(tableHandle); jTable = jscroll.getViewport.getView; jTable.setRowHeight(30);
and it works. The problem is every time that I resize the window or I make visible or invisble the uitable, the row height is modified to the default matlab row height.
There is any way to modify permanently the row height? I include the code above in resize figure function but is not properly way because the user see the effect of increase the height every time, and I don't like it.
0 comentarios
Respuesta aceptada
Jiawen Liu
el 9 de Nov. de 2017
Hi asd,
I understand that you are facing an issue with adjusting the row height permanently in Uitable. MATLAB does not provide a direct way to change the row height in Uitable. The workaround is to change the "FontSize" property of Uitable.
Please refer to the example below:
>> f = figure;
>> t = uitable(f,'Data',randi(100,5,3),'Position',[20 20 260 204]);
>> t.FontSize = 18
If you do not expect the user to see the effect of the row height updating, you could set the "FontSize" property while creating the uitable as following:
>> t = uitable(f,'Data',randi(100,5,3),'Position',[20 20 260 204],'FontSize',18);
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Develop Apps Using App Designer en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!