[Scilab-users] Using uimenue to change rotation_angles

Samuel Gougeon sgougeon at free.fr
Sun Dec 18 16:56:01 CET 2016


Jens,

Le 18/12/2016 15:31, Samuel Gougeon a écrit :
>
> scf();
> param3d([0 1 1 1],[0 0 1 1],[0 0 0 1]);
> ce = gce();
> ce.thickness = 10;
> m1 = uimenu('label', 'alpha=50', 'callback',"ca=gca(); 
> ca.rotation_angles(1)=50");
> m2 = uimenu('label', 'alpha=80', 'callback',"ca=gca(); 
> ca.rotation_angles(1)=80");

At the time the menu is clicked, the current axes may be no longer the 
one of the parent figure of the clicked component (menu). So instead of 
ca = gca(), the callback should use gcbo for a more robust 
implementation: https://help.scilab.org/docs/6.0.0/en_US/gcbo.html

SG

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20161218/6ba31fd5/attachment.htm>


More information about the users mailing list