フィルターのクリア

How to position a table within a figure?

5 ビュー (過去 30 日間)
Sean Byrne
Sean Byrne 2021 年 1 月 30 日
回答済み: dpb 2021 年 1 月 30 日
Hi,
I'm trying to position a table within a figure however the defult table posiiton properties do not match with the cell size and hides some of the data.
This is the current solution I am using however it's not efficent as i've had to check mutliple times on the pixel location and edit.
f1 = uifigure;
f1.WindowState = 'fullscreen';
t1 = uitable(f1,'data',data,'ColumnName',colnames);
t1.Position = [100 150 350 200]
Is there a way to position the table in a spcefic location based on teh figure window? For example, the centre or other set locations of the figure?
Cheers

回答 (1 件)

dpb
dpb 2021 年 1 月 30 日
You can retrieve the figure position vector from which you can get the width and height of the figure (3rd and 4th elements, respectively). You could then adjust the table position and size based on those; the position of the table begins at [0,0] in lower left corner of the figure.

カテゴリ

Help Center および File ExchangeDevelop uifigure-Based Apps についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by