[Scilab-users] ?==?utf-8?q? uicontrol style layer
Antoine Monmayrant
amonmayr at laas.fr
Fri Feb 12 11:03:35 CET 2016
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.
More information about the users
mailing list