When I set the Position property height and width to the height and width values returned by the Extent property of a uitable, I observe different results in R2008a and R2008b. This seems to stem from the fact that the Extent property returns different values for the same uitable in R2008a and R2008b. For example, when I execute the following code,
figh = figure;u = uitable('Parent',figh,'Data',ones(1,6),'Units','pixels');drawnow;pos = get(u, 'Position');ext = get(u, 'Extent')set(u, 'Position', [pos(1:2) ext(3:4)]);figPos = get(figh, 'Position');set(figh, 'Position', [figPos(1:2) ext(3:4)+25]);
in R2008a, I receive,
ext = 0 0 482 36
and in R2008b, I receive,
ext = 0 0 484 38
The uitable in R2008b has a few pixels of extra space on the right and bottom when using the Windows XP theme, as shown in the attached screenshot.
Best Answer