Filter löschen
Filter löschen

Add a title to uitable

13 Ansichten (letzte 30 Tage)
Lily
Lily am 4 Okt. 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]);

Akzeptierte Antwort

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

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Migrate GUIDE Apps finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by