uitreenode size\position change

4 ビュー (過去 30 日間)
Mohamed AKI Ahmed
Mohamed AKI Ahmed 2022 年 7 月 20 日
回答済み: Aditya Singh 2023 年 6 月 15 日
Hello. I want to know if it is possible to change the size/position in uitreenode. I am using GUIDE and in my panel tree, the innerposition can't be edited and always have the same value of the outerposition and position, thus, some of the content inside the tree are not visible

回答 (1 件)

Aditya Singh
Aditya Singh 2023 年 6 月 15 日
Hello AKI,
As per my understanding you want to change the position of ‘uitreenode’.
Uitrees are created with a default position of (0,0), a width of 200 (or less if the figure is narrower) and a height spanning the entire figure’s content area. This can easily be modified following the tree’s creation using its Position property:
mtree = uitree(...);
mtree.Position = [100,100,50,150]; % modify position & size
mtree.Position(4) = 100; % limit tree height to 100 pixels
You can also use the ‘innerPosition’ property.
The Location and size is specified as a four-element vector of the form, - [left bottom width height]. The values in the vector are relative to the parent container. All measurements are in pixel units.
For more information and examples, kindly refer to:
Hope it helps!

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by