Why does set(0, 'Children', foo) not stack figure windows correctly in MATLAB 7.0.0 (R14)?

1 view (last 30 days)
The documentation clearly states that "You can change the order of the handles in the children property of the root and thereby change the stacking order of the figures on the display".
To reproduce this issue the following commands:
figure('Position', [100 200 560 420])
figure('Position', [200 240 560 420])
figure('Position', [300 280 560 420])
On screen figure 3 is on top of 2 which is on top of 1. This is correctly indicated by the "Children" property of the "root" (0).
get(0, 'Children')
ans =
3
2
1
Now try reversing the figure stacking order.
set(0, 'Children', [1 2 3]')
At this point figure 1 should be on top of figure 2 which in turn should
be on top of figure 3. However, this is not the case; figure 2 is
on top of figure 1 which is on top of figure 3.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
This bug was fixed in MATLAB 7.1 (R14SP3). If you are using a previous version please read the following:
There is a bug in MATLAB 7.0.0 (R14), 7.0.1 (R14SP1) and 7.0.4 (R14SP2) that causes the figures to be stacked in the incorrect order. To work around this issue, you can use the FIGURE command to stack the figures appropriately.
figure('Position', [100 200 560 420])
figure('Position', [200 240 560 420])
figure('Position', [300 280 560 420])
ch = get(0,'children')
figure(ch(3))
figure(ch(2))
figure(ch(1))

More Answers (0)

Categories

Find more on Interactive Control and Callbacks in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!