필터 지우기
필터 지우기

Change font value of uitable headings in GUI

조회 수: 2 (최근 30일)
James Boyle
James Boyle 2017년 8월 2일
댓글: James Boyle 2017년 8월 2일
I've added an image to highlight what I mean. I can change the font easily for the values in my table by using xtable.FontSize = 6; but the titles in the left hand column always stay the same size. This is a problem because when I run the GUI on a machine with a smaller screen size, the left hand column takes up the entirety of the table width. Changing ColumnWidth does not help either. Is there a way of doing this, even if it is a complicated work around? Thanks. (Windows 10, R2016a)

채택된 답변

ES
ES 2017년 8월 2일
You should use HTML tags.
ColumnNames = { ....
'<html><center /><font face="verdana" size=3>Column Heading 1</font></html>', ...
'<html><center /><font face="verdana" size=3>Column Heading 2</font></html>', ...
set(hObject, 'ColumnName',ColumnNames);
set(hObject, 'ColumnWidth',ColumnWidth);
  댓글 수: 1
James Boyle
James Boyle 2017년 8월 2일
Thanks, this is really good, however when I apply it to a Row, it for some reason makes the row take up the entire length of the table! Any ideas how to restrict its length? Thanks!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by