uitreenode size\position change

4 views (last 30 days)
Mohamed AKI Ahmed
Mohamed AKI Ahmed on 20 Jul 2022
Answered: Aditya Singh on 15 Jun 2023
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

Answers (1)

Aditya Singh
Aditya Singh on 15 Jun 2023
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!

Categories

Find more on Migrate GUIDE Apps in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!