Borrar filtros
Borrar filtros

uitable different colors for row headers, resize row headers

5 visualizaciones (últimos 30 días)
rmc256
rmc256 el 25 de Sept. de 2012
I have a uitable in a GUIDE gui. It has one column, and uses the row headers, so for example:
Thing1 0.0
Thing2 0.0
Thing3 0.0
Where Thing1,2,3 are the row headers, and 0.0's the first column cell contents.
I want to have each individual row header have a different background. One solution I have works:
rowName={'<font color=''white'' bgcolor="rgb(0,0,255)">Thing1</font>',...
'<font color=''white'' bgcolor="rgb(255,0,0)">Thing2</font>',...
'<font color=''white'' bgcolor="rgb(0,255,0)">Thing3</font>'};
set(handles.uitable,'RowName',rowName)
The problem is, the row header column width is made huge, overrunning, the first cell column (the one with the 0.0's). Is there any property I can add to the html<font> tags that will force the row headers to be narrower? I tried using "width", but that didn't work. I also tried "align", since the resulting rowName are all center aligned, and there is a lot of room on either side.
Open to other solutions also.

Respuestas (0)

Categorías

Más información sobre Migrate GUIDE Apps en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by