Effacer les filtres
Effacer les filtres

Add a title to uitable

13 vues (au cours des 30 derniers jours)
Lily
Lily le 4 Oct 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]);

Réponse acceptée

Walter Roberson
Walter Roberson le 4 Oct 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 commentaire
Lily
Lily le 4 Oct 2012
oh, I was hopeing for a easy, duable solution but it's ok. THx so much for the info :)

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Migrate GUIDE Apps dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by