Rectangle

BrowseName: Rectangle
SuperType: Container (Container)
TypeView path: Tipi > UI> Disegni> Rettangolo

Rectangle that can be adapted to fit design needs

Applications

Typically used to define a background of other objects (for example a panel), to graphically group relevant objects, or to create custom buttons.

Configuring the object

Create a custom button

It is possible to make customized buttons with a Rectangle object and other graphical objects, such as a Label object and an Image object. Below is an example:

../../../_images/Rectangle_download_button.png
  1. Create a Rectangle object and add the following objects inside:
    • Label: enter the desired text in its Text property and set the position with respect to the rectangle.

    • Image: in its Path property point to the desired image, usually an icon, and set the position relative to the rectangle.

  2. In the rectangle properties, set Visible on click to True.

  3. Associate the method to execute on click with the MouseUp Event rectangle event.

Properties

Name

BrowseName

DataType

Description

Border color

BorderColor

Color

Color of the polygon border

Fill color

FillColor

Color

Fill color of the polygon area

Border thickness

BorderThickness

Size

Border thickness in pixels

Corner radius

CornerRadius

Size

Curvature of the corners

Hit test visible

HitTestVisible

Boolean

True = intercept user clicks. False = does not intercept user clicks, which are instead passed to the underlying object, based on the order on the z axis.

Visible

Visible

Boolean

Show/hide the window.
(Inherited from Element)
Enabled

Enabled

Boolean

Enables/disables the interaction with the user (True = enabled; False = disabled).
(Inherited from Element)
Opacity

Opacity

Float

Opacity level (0 = transparent)
(Inherited from Element)
Left margin

LeftMargin

Size

(Only if Horizontal Alignment = Left or Center or Stretch) Distance between the left edge of the object and the left edge of its container.
(Inherited from Element)
Top margin

TopMargin

Size

(Only if Vertical Alignment = Top or Center or Stretch) Distance between the top edge of the object and the top edge of its container.
(Inherited from Element)
Right margin

RightMargin

Size

(Only if Horizontal Alignment = Right or Center or Stretch) Distance between the right edge of the object and the right edge of its container.
(Inherited from Element)
Bottom margin

BottomMargin

Size

(Only if Vertical Alignment = Bottom or Center or Stretch) Distance between the bottom edge of the object and the bottom edge of its container.
(Inherited from Element)
Width

Width

Size

Width of the window. It can assume values greater than or equal to zero. The Auto value sets the width equal to the width of the content (in this case, in the absence of content the object collapses).
(Inherited from Element)
Height

Height

Size

Height of the window. It can assume values greater than or equal to zero. The Auto value sets the height equal to the height of the content (in this case, in the absence of content the object collapses).
(Inherited from Element)
Horizontal alignment

HorizontalAlignment

HorizontalAlignment

Alignment of the object on the horizontal axis. Left = the left side is positioned on the left side of the container, except for the left margin; Right = the right side is positioned on the right side of the container, except for the right margin; Center = the center of the object is positioned in the center of the container, except for the left and/or right margins; Stretch = object width equals container width, except for the left and/or right margins.
(Inherited from Element)
Vertical alignment

VerticalAlignment

VerticalAlignment

Alignment of the object on the vertical axis. Top = the top side is positioned on the top side of the container, except for the top margin; Bottom = the bottom side is positioned on the bottom side of the container, except for the bottom margin; Center = the center of the object is positioned in the center of the container, except for the top and/or bottom margins; Stretch = object height equals container height, except for the top and/or bottom margins.
(Inherited from Element)
Rotation

Rotation

Size

Rotation of the object around its center point. Positive values indicate clockwise arc degrees.
(Inherited from Element)

Events

MouseDown event

BrowseName: MouseDownEvent

MouseUp event

BrowseName: MouseUpEvent