[Scilab-users] ?==?utf-8?q? uicontrol style layer

Philipp Mühlmann p.muehlmann at gmail.com
Fri Feb 12 20:01:40 CET 2016


OK, thank you.

2016-02-12 11:03 GMT+01:00 Antoine Monmayrant <amonmayr at laas.fr>:

>
> Le Vendredi 12 Février 2016 09:21 CET, Philipp Mühlmann <
> p.muehlmann at gmail.com> a écrit:
>
> > Can anyone please explain in more detail - than given in the help - the
> > purpose of the uicontrol layer-style?
> >
> > How would one use this?
> >
> > Could one put several layer one over each other?
>
> Short answer: I don't think so.
>
> Longer answer: I found some info on the layers in the unit tests:
>
> function layer = create_layer(count)
>     c = get(0);c.usedeprecatedskin = "off"
>     f = figure("dockable", "off" ,"infobar_visible", "off",
> "toolbar_visible", "off", "menubar_visible", "off", "layout", "border")
>     f.figure_size = [300, 300];
>
>     //layer
>     layer = uicontrol(f, "style", "layer", "constraints",
> createConstraints("border", "center"));
>
>     for i = 1:count
>         fr1 = uicontrol(layer, "style", "frame");
>         fr1.layout_options = createLayoutOptions("border", [10, 10]);
>         fr1.layout = "border";
>         uicontrol(fr1, "string", "button " + string(i) + "1",
> "constraints", createConstraints("border", "top"));
>         uicontrol(fr1, "string", "button " + string(i) + "2",
> "constraints", createConstraints("border", "left"));
>         uicontrol(fr1, "string", "button " + string(i) + "3",
> "constraints", createConstraints("border", "center"));
>         uicontrol(fr1, "string", "button " + string(i) + "4",
> "constraints", createConstraints("border", "bottom"));
>         uicontrol(fr1, "string", "button " + string(i) + "5",
> "constraints", createConstraints("border", "right"));
>     end
> endfunction
>
>
> What you can do with this function:
>
> ll=createlayer(3).
>
> ll.value=1; //figure shows the 4 buttons you put in the 1st layer
> ll.value=2; // now figure shows the 4 buttons you put in the 2nd layer
> ll.value=3; // now figure shows the 4 buttons you put in the 3rd layer
>
>
> This is how I understand the usage of such layer uicontrol: use a layer
> for each user interface you want (like one with a graph taking up all the
> figure size, one with parameter boxes, one with loading data infos, ...)
> then use the layer.value=i to show quickly the ith bit of the interface you
> want.
>  If I'm correct, this is just like a tab uicontrol, minus the tab at the
> top!
>
> Antoine
>
> >
> > Example:
> >
> > 1st layer:    Image
> >
> > 2nd layer:   plot of a function?
> >
> > result:  plot over an Background Image
> >
> >
> > BR
> > Philipp
> >
> >
> > --
> > There we have the salad.
>
>
>
>
>
>
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users
>



-- 
There we have the salad.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20160212/81dfc986/attachment.htm>


More information about the users mailing list