I am trying to obtain the handle of a TextBox in a GUI window.
>> SliderTool
>> h = findobj('Tag', 'xText')
h =
0x0 empty GraphicsPlaceholder array.
>>
Why is h
an empty array?
By default (at least in R2015b) the GUI figure's property HandleVisibility
is set to callback
this prevents findobj
to find the handle of the uicontrols even if the HandleVisibility
of the uicontrol is set to on
.
To solve your problem, you have to set the HandleVisibility
property of the figure
to on
too.
The following picture shows how to set the HandleVisibility
of the GUI figure and the result.