Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
2024.1.0 - Русский


Border Constraints Properties

Description of the border constraints set of properties.

Syntax

constraints = createConstraints("border")
constraints = createConstraints("border", position)
constraints = createConstraints("border", position, preferredsize)

Arguments

position

A string

"top" | "left" | {"center"} | "right" |"bottom"

The position of the element in the layout

preferredsize

[width, height] a 1-by-2 matrix of doubles, [-1, -1] by default.

The preferred width or height of the element in the layout in pixels if not constrained.

constraints

The created constraints.

Description

This functions creates the border constraints to set the constraints attribute of an uicontrol.

Examples

//Creating a figure with the border layout with 50 pixel padding in width and 10 in height
f = figure( ...
"dockable"        , "off",...
"infobar_visible" , "off",...
"toolbar"         , "none",...
"menubar_visible" , "off",...
"menubar"         , "none",...
"default_axes"    , "off",...
"layout"          , "border",...
"layout_options", createLayoutOptions("border", [50,10]),...
"visible"         , "on");

c = createConstraints("border", "top", [50,10]);
//First frame is on top with 10 pixel in height
u_grid1 = uicontrol(f,...
"style", "frame",...
"backgroundcolor", [1 0 0], ...
"constraints", c);

sleep(500);
c.position = "left";
u_grid2 = uicontrol(f,...
"style", "frame",...
"backgroundcolor", [0 1 0], ...
"constraints", c);

sleep(500);
c.position = "center";
u_grid3 = uicontrol(f,...
"style", "frame",...
"backgroundcolor", [0 0 1], ...
"constraints", c);

sleep(500);
c.preferredsize = [10, 100];
c.position = "right";
u_grid4 = uicontrol(f,...
"style", "frame",...
"backgroundcolor", [1 1 0], ...
"constraints", c);

sleep(500);
c.position = "bottom";
u_grid5 = uicontrol(f,...
"style", "frame",...
"backgroundcolor", [1 0 1], ...
"constraints", c);

See also

  • layout — Description of the different layouts and constraints for uicontrols and figures.
  • createConstraints — Creates the layout constraints structure for a uicontrol.
  • uicontrol — create a Graphic User Interface object
  • uicontrol_properties — Description of the uicontrol properties.

History

ВерсияОписание
5.5.0 Function createBorder introduced.
Report an issue
<< Layouts Layouts Border Layout Options Properties >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Mon Jun 17 17:55:07 CEST 2024