Stuart’s MATLAB Videos

Watch and Learn

HandleVisibility property to make GUIs visible in handles hierarchy 3

Posted by Doug Hull,

A MATLAB user recently asked me why they could not find the handle to their GUI as a child of the root.

get(0, ‘children’)

The reason is they needed to change the handleVisibilty property of the GUI. This video shows how that is done.

3 CommentsOldest to Newest

Keith Lindsay replied on : 1 of 3
Hey, Doug, thanks for the little video on "HandleVisibility property to make GUIs visible in handles hierarchy". This problem was driving me nuts until I watched your video. BTW, what do you use to make those on-screen videos, if you don't mind sharing? Thanks again... Keith Lindsay
Sarah replied on : 3 of 3
Thanks for this information Doug... I'd just been watching another of your videos about children, and immediately jumped to the conclusion that I'd be able to find GUIs based on the children of the root. Imagine my surprise when that didn't work! However, I came up with a different solution than the one shown here that may be more applicable when in a setting where you are the programmer, and not the end user, and thus still wish to keep those GUIs "hidden". While writing code that needs access to all of the GUI's figure handles (and resultant wealth of information) the programmer can temporarily set the root's 'ShowHiddenHandles' Property to 'on' to retrieve data, and then return it to 'off' when finished. This allows the programmer the flexibility of seeing EVERY GUI, while still limiting the end-user. Set(0, ‘ShowHiddenHandles’, ‘on’) hKids = get(0, ‘Children’) kidNames = get(hKids, ‘Name’) Set(0, ‘ShowHiddenHandles’, ‘off’)