[Scilab-Dev] xcos blocks showing dynamic parameters

Clément David clement.david at scilab-enterprises.com
Tue Nov 27 08:50:59 CET 2012


Hello,

In Xcos, we use images or text rendering to display the blocks icons.
These settings can be modified using a CSS-like key-value properties on
xcosPalAddBlock. Take a look at the style argument.

Basically, to display the second exprs text on the block, use
style="displayedLabel=%2$s". An exemple is provided on
SCI/contrib/xcos_toolbox_skeleton.

Le lundi 26 novembre 2012 à 16:12 +0100, Len Remmerswaal a écrit :
> Hi all,
> I used to have scicos blocks that were able to show some parameters on their instantiations. This was how:
> - In the "define" case of the interface function: in the gr_i string to be displayed: reference some variable names.
> - In the "set" case of the interface function: assign new values to these variables and store them in the arg1.graphics.exprs list.
> - In the "plot" case of the interface function: unpack the same variables from arg1.graphics.exprs and call standard_draw.
>  
> Worked like a charm in scicos 4.3. Stopped working in Scilab 5.3.3.
>  
> I do see blocks like CONST_m displaying their parameter and changing them dynamically after assigning new parameter values. What I do not see is how it is done: I do not see, after the dialog is dismissed in scicos_getvalues, where the parameter gets to be displayed on the xcos diagram.
> Can anyone point me in the right direction?
> Thanks,
> Len Remmerswaal.
>  
> _______________________________________________
> dev mailing list
> dev at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/dev

-- 
Clément DAVID
Development Engineer / Account Manager
-----------------------------------------------------------
Scilab Enterprises
143bis rue Yves Le Coz - 78000 Versailles, France
Mobile: +33.6.26.26.51.90
Phone: +33.2.90.22.78.96
http://www.scilab-enterprises.com




More information about the dev mailing list