Difference between revisions of "Container"

From Lianjapedia
Jump to: navigation, search
Line 20: Line 20:
 
|Numeric
 
|Numeric
 
|Border color as a decimal, e.g. 16711935 or rgb(255,0,255)
 
|Border color as a decimal, e.g. 16711935 or rgb(255,0,255)
 +
|-
 +
|BorderRadius
 +
|RW
 +
|Numeric
 +
|Border radius in pixels. (From v4.1).  This can be specified in conjunction with "border" to draw a rounded rectangle.
 
|-
 
|-
 
|BorderWidth
 
|BorderWidth
Line 25: Line 30:
 
|Numeric
 
|Numeric
 
|Border width in pixels
 
|Border width in pixels
 +
|-
 +
|valign="top"|Caption
 +
|valign="top"|RW
 +
|valign="top"|Character
 +
|valign="top"|Caption text (groupbox style container). (From v4.1).
 +
|-
 +
|valign="top"|CaptionAlignment
 +
|valign="top"|RW
 +
|valign="top"|Numeric or Character
 +
|valign="top"|Caption alignment (groupbox style container): 0,1,2 or 'left', 'right', 'center'. (From v4.1).
 +
|-
 +
|valign="top"|CaptionFontSize
 +
|valign="top"|RW
 +
|valign="top"|Numeric or Character
 +
|valign="top"|Caption font size (groupbox style container): number or 'small', 'medium', 'large', 'x-large', 'xx-large'. (From v4.1).
 +
|-
 +
|CaptionForeColor
 +
|RW
 +
|Numeric
 +
|Caption forecolor (groupbox style container). (From v4.1).  Change the groupbox color by setting bordercolor.
 
|-
 
|-
 
|ControlCount
 
|ControlCount
Line 134: Line 159:
 
|valign="top"|name as Character | operation as Character<br>[, operation as Character [, arguments as Character]]
 
|valign="top"|name as Character | operation as Character<br>[, operation as Character [, arguments as Character]]
 
|valign="top"|Draw operations include the following: brush, clear, eclipse, fill, font, image, lineto, moveto, pen, point, rectangle, redraw, restore, save.  (From Lianja v3.1).  
 
|valign="top"|Draw operations include the following: brush, clear, eclipse, fill, font, image, lineto, moveto, pen, point, rectangle, redraw, restore, save.  (From Lianja v3.1).  
 +
|-
 +
|valign="top"|HandleChildEvents
 +
|valign="top"|state as Boolean
 +
|valign="top"|Determines whether mouseenter, mouseleave, click and dblclick events for inner child components are propagated to the container. (From v4.1).
 
|-
 
|-
 
|RemoveObject
 
|RemoveObject
Line 142: Line 171:
 
|valign="top"|property as Character, value as Expression[, class as Character]
 
|valign="top"|property as Character, value as Expression[, class as Character]
 
|valign="top"|Currently ignored.
 
|valign="top"|Currently ignored.
 +
|-
 +
|valign="top"|SetStretchFactor
 +
|valign="top"|index as Numeric, stretchfactor as Numeric
 +
|valign="top"|Sets the relative sizes of the UI controls inside the container. (From v4.1).  For example, if you set the stretchfactor of the first UI control (index 0) to 2 and the others to 1, then the first UI control will be twice the width of the others.
 
|-
 
|-
 
|}
 
|}

Revision as of 12:41, 21 November 2017

Note: property, method and event names should be referred to in lowercase in case-sensitive scripting languages.

Properties

This class supports the Common Properties plus the following:

Property Access (R/RW) Value Description
Border RW Boolean Border is displayed
BorderColor RW Numeric Border color as a decimal, e.g. 16711935 or rgb(255,0,255)
BorderRadius RW Numeric Border radius in pixels. (From v4.1). This can be specified in conjunction with "border" to draw a rounded rectangle.
BorderWidth RW Numeric Border width in pixels
Caption RW Character Caption text (groupbox style container). (From v4.1).
CaptionAlignment RW Numeric or Character Caption alignment (groupbox style container): 0,1,2 or 'left', 'right', 'center'. (From v4.1).
CaptionFontSize RW Numeric or Character Caption font size (groupbox style container): number or 'small', 'medium', 'large', 'x-large', 'xx-large'. (From v4.1).
CaptionForeColor RW Numeric Caption forecolor (groupbox style container). (From v4.1). Change the groupbox color by setting bordercolor.
ControlCount R Numeric Number of controls in Container
Gradient RW Numeric Gradient type: 0 = none, 1 = vertical spread, 2 = left to right, 3 = right to left, 4 = vertical centered, 5 = iPad style
GradientFromColor RW Numeric Gradient start color
GradientToColor RW Numeric Gradient end color
Layout RW Numeric or Character Layout: 1 = horizontal, 2 = vertical, 3 = form, 4 = grid. (grid layout available from Lianja v3.1).
Margin RW Numeric Margin size in pixels
MarginBottom RW Numeric Bottom margin in pixels
MarginLeft RW Numeric Left margin in pixels
MarginRight RW Numeric Right margin in pixels
MarginTop RW Numeric Top margin in pixels
MouseX RW Numeric Mouse X position. (From Lianja v3.1).
MouseY RW Numeric Mouse Y position. (From Lianja v3.1).
Picture RW Character Filename of background image
Spacing RW Numeric Control spacing in pixels

Methods

This class supports the Common Methods plus the following:

Method Args Description
AddObject existing as Object | newobject as Character, class as Character [, row as Numeric, column as Numeric [, rows as Numeric, columns as Numeric]] Adds an existing object or a new object, in which case the object's class must also be specified.
For grid Layout (available from Lianja v3.1), specify the target row and column and optionally the number of rows and columns the object should occupy.
The target row and column start from 0.
AddRow label as Character, existing as Object | newobject as Character, class as Character Adds an existing object or a new object, in which case the object's class must also be specified. The label and the object are added as a new row to Containers with 'form' layout only
AddSpacing size as Numeric Adds a spacer of the specified size: height where the container layout is vertical (2), width where the container layout is horizontal (1)
AddStretch None Adds a spacer that expands to fill the available space
Browse browseCommand as Character, cursorAlias as Character[, clickHandler as Character[, dblclickhandler as Character]] Embeds a BROWSE grid in the container as specified in the browseCommand for the cursor specified in cursorAlias. Click and double-click event handlers can optionally be specified. Returns an object reference to the embedded Grid . (From Lianja v3.3).
Controls control as Numeric Returns an object reference to the specified control within the container
Draw name as Character | operation as Character
[, operation as Character [, arguments as Character]]
Draw operations include the following: brush, clear, eclipse, fill, font, image, lineto, moveto, pen, point, rectangle, redraw, restore, save. (From Lianja v3.1).
HandleChildEvents state as Boolean Determines whether mouseenter, mouseleave, click and dblclick events for inner child components are propagated to the container. (From v4.1).
RemoveObject existing as Object Removes the specified object
SetAll property as Character, value as Expression[, class as Character] Currently ignored.
SetStretchFactor index as Numeric, stretchfactor as Numeric Sets the relative sizes of the UI controls inside the container. (From v4.1). For example, if you set the stretchfactor of the first UI control (index 0) to 2 and the others to 1, then the first UI control will be twice the width of the others.

Events

This class supports the Common Events plus the following:

Event Args Description