Azzera filtri
Azzera filtri

Add a title to uitable

13 visualizzazioni (ultimi 30 giorni)
Lily
Lily il 4 Ott 2012
Hi
Is is possible to add a title, like in a figure, onto a uitable ( http://www.mathworks.se/help/matlab/ref/uitable.html)?
Let's use the example from the site. Would it be possible to say that the title is "Confusion table"?
f = figure('Position',[200 200 400 150]);
dat = rand(3);
cnames = {'X-Data','Y-Data','Z-Data'};
rnames = {'First','Second','Third'};
t = uitable('Parent',f,'Data',dat,'ColumnName',cnames,...
'RowName',rnames,'Position',[20 20 360 100]);

Risposta accettata

Walter Roberson
Walter Roberson il 4 Ott 2012
Sorry, there is no property for that.
You could create a uicontrol('Style','text') and position it just above the uitable()
I did not suggest using text() here because text() needs to go on an axes, but uitable() and uicontrol() do not sit on axes (and look strange if you try to position them right where an axes also is.)
  1 Commento
Lily
Lily il 4 Ott 2012
oh, I was hopeing for a easy, duable solution but it's ok. THx so much for the info :)

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Migrate GUIDE Apps in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by