[Scilab-Dev] Problem/missing feature with uicontrols

Stéphane Mottelet stephane.mottelet at utc.fr
Wed Jun 16 17:48:55 CEST 2010


Le 16/06/2010 17:07, Stéphane Mottelet a écrit :
> Hi all,
>
> There is a missing (easy to implement) feature in uicontrols.
> When you create e.g. a button as a children of a frame, when
> making the frame invisible, the button should also dissapear,
> regardless of its 'visible'  property. Actually, this is not the case
> (at least in Scilab 5.2.1). This is very annoying, since in Tk
> the visible state is inherited by childrens. Try the following
> piece of code :
>
> f=uicontrol('style','frame','position',[0 0 100 200]);
> b=uicontrol(f,'style','pushbutton','position',[0 0 100 
> 20],'string','push me');
> set(f,'visible','off');
>
> S.
>
>
I am sorry, but I discovered worse things : the "position" property is
relative to the parent at creation time, but when you move a widget
by changing its position, then children stay stuck on the root window.
See the example code :

f=uicontrol('style','frame','position',[100 100 100 100]);
b=uicontrol(f,'style','pushbutton','position',[0 0 100 
20],'string','push me');
f.position=[0 0 100 100]

Is it a bug or a feature ?


S.



More information about the dev mailing list