Difference between revisions of "Form"

From Lianjapedia
Jump to: navigation, search
Line 11: Line 11:
 
!width="50%"|Description
 
!width="50%"|Description
 
|-
 
|-
|valign="top"|WindowState
+
|valign="top"|Actionbar
 
|valign="top"|RW
 
|valign="top"|RW
|valign="top"|Numeric
+
|valign="top"|Boolean
|valign="top"|Window state: 0 = normal, 1 = minimized, 2 = maximized, 3 = fullscreen/kiosk
+
|valign="top"|Whether form has an actionbar
 
|-
 
|-
|valign="top"|WindowType
+
|valign="top"|AlwaysOnBottom
 
|valign="top"|RW
 
|valign="top"|RW
|valign="top"|Numeric
+
|valign="top"|Boolean
|valign="top"|Window type: 0 = modeless, 1 = modal
+
|valign="top"|Whether form should always be on the bottom
 +
|-
 +
|AlwaysOnTop
 +
|RW
 +
|Boolean
 +
|Whether form should always be on top
 +
|-
 +
|valign="top"|AutoCenter
 +
|valign="top"|RW
 +
|valign="top"|Boolean
 +
|Whether form is autocentered
 +
|-
 +
|BufferMode
 +
|RW
 +
|Numeric
 +
|Buffer mode
 
|-
 
|-
 
|Caption
 
|Caption
Line 25: Line 40:
 
|Character
 
|Character
 
|Text displayed in caption
 
|Text displayed in caption
 +
|-
 +
|Closable
 +
|RW
 +
|Boolean
 +
|Whether form is closable
 +
|-
 +
|valign="top"|ControlCount
 +
|valign="top"|R
 +
|valign="top"|Numeric
 +
|Number of controls in form
 
|-
 
|-
 
|valign="top"|CurrentX
 
|valign="top"|CurrentX
Line 36: Line 61:
 
|valign="top"|Current y coordinate for the next drawing method
 
|valign="top"|Current y coordinate for the next drawing method
 
|-
 
|-
|valign="top"|AutoCenter
+
|valign="top"|DrawWidth
 
|valign="top"|RW
 
|valign="top"|RW
|valign="top"|Boolean
+
|valign="top"|Numeric
|Whether form is autocentered
+
|valign="top"|Line width in pixels for draw operations
 
|-
 
|-
|valign="top"|Picture
+
|valign="top"|ExitOnClose
|valign="top"|RW
+
|valign="top"|Character
+
|Filename of background image
+
|-
+
|Closable
+
|RW
+
|Boolean
+
|Whether form is closable
+
|-
+
|valign="top"|Statusbar
+
 
|valign="top"|RW
 
|valign="top"|RW
 
|valign="top"|Boolean
 
|valign="top"|Boolean
|Whether form has a statusbar
+
|valign="top"|Whether to exit session on closing form
 
|-
 
|-
|valign="top"|Message
+
|valign="top"|FillColor
 
|valign="top"|RW
 
|valign="top"|RW
|valign="top"|Character
+
|valign="top"|Numeric or Character
|Text displayed in statusbar
+
|valign="top"|Fill color
 
|-
 
|-
|AlwaysOnTop
+
|FillStyle
 
|RW
 
|RW
|Boolean
+
|Numeric
|Whether form should always be on top
+
|Fill style setting
 
|-
 
|-
|valign="top"|AlwaysOnBottom
+
|valign="top"|KeyPreview
 
|valign="top"|RW
 
|valign="top"|RW
 
|valign="top"|Boolean
 
|valign="top"|Boolean
|valign="top"|Whether form should always be on the bottom
+
|valign="top"|Whether keypreview is enabled
|-
+
|valign="top"|ShowTips
+
|valign="top"|RW
+
|valign="top"|Boolean
+
|valign="top"|Whether tooltips are shown for controls in the form
+
|-
+
|valign="top"|MinButton
+
|valign="top"|RW
+
|valign="top"|Boolean
+
|valign="top"|Whether form has a minimize button
+
 
|-
 
|-
 
|valign="top"|MaxButton
 
|valign="top"|MaxButton
Line 86: Line 91:
 
|valign="top"|Whether form has a maximize button
 
|valign="top"|Whether form has a maximize button
 
|-
 
|-
|valign="top"|Titlebar
+
|valign="top"|Message
 
|valign="top"|RW
 
|valign="top"|RW
|valign="top"|Boolean
+
|valign="top"|Character
|valign="top"|Whether form has a titlebar
+
|Text displayed in statusbar
 
|-
 
|-
|valign="top"|Actionbar
+
|valign="top"|MinButton
 
|valign="top"|RW
 
|valign="top"|RW
 
|valign="top"|Boolean
 
|valign="top"|Boolean
|valign="top"|Whether form has an actionbar
+
|valign="top"|Whether form has a minimize button
|-
+
|BufferMode
+
|RW
+
|Numeric
+
|Buffer mode
+
 
|-
 
|-
 
|valign="top"|MousePointer
 
|valign="top"|MousePointer
Line 106: Line 106:
 
|valign="top"|Mouse pointer: 0 = arrow, 1 = arrow, 2 = cross, 3 = I-beam, 5 = size, 6 = NE/SW, 7 = size N/S, 8 = size NW/SE, 9 = size W/E, 10 = up arrow, 12 = no drop, 15 = pointing hand
 
|valign="top"|Mouse pointer: 0 = arrow, 1 = arrow, 2 = cross, 3 = I-beam, 5 = size, 6 = NE/SW, 7 = size N/S, 8 = size NW/SE, 9 = size W/E, 10 = up arrow, 12 = no drop, 15 = pointing hand
 
|-
 
|-
|valign="top"|KeyPreview
+
|valign="top"|Picture
 
|valign="top"|RW
 
|valign="top"|RW
|valign="top"|Boolean
+
|valign="top"|Character
|valign="top"|Whether keypreview is enabled
+
|Filename of background image
|-
+
|valign="top"|ExitOnClose
+
|valign="top"|RW
+
|valign="top"|Boolean
+
|valign="top"|Whether to exit session on closing form
+
 
|-
 
|-
 
|valign="top"|Scrollbars
 
|valign="top"|Scrollbars
Line 121: Line 116:
 
|valign="top"|Scrollbars: 0 = none, 1 = horizontal, 2 = vertical, 3 = both
 
|valign="top"|Scrollbars: 0 = none, 1 = horizontal, 2 = vertical, 3 = both
 
|-
 
|-
|valign="top"|ControlCount
+
|valign="top"|ShowTips
|valign="top"|R
+
|valign="top"|RW
|valign="top"|Numeric
+
|valign="top"|Boolean
|Number of controls in form
+
|valign="top"|Whether tooltips are shown for controls in the form
 
|-
 
|-
|FillStyle
+
|valign="top"|Statusbar
|RW
+
|valign="top"|RW
|Numeric
+
|valign="top"|Boolean
|Fill style setting
+
|Whether form has a statusbar
 
|-
 
|-
|valign="top"|FillColor
+
|valign="top"|Titlebar
 
|valign="top"|RW
 
|valign="top"|RW
|valign="top"|Numeric or Character
+
|valign="top"|Boolean
|valign="top"|Fill color
+
|valign="top"|Whether form has a titlebar
 
|-
 
|-
|valign="top"|DrawWidth
+
|valign="top"|WindowState
 
|valign="top"|RW
 
|valign="top"|RW
 
|valign="top"|Numeric
 
|valign="top"|Numeric
|valign="top"|Line width in pixels for draw operations
+
|valign="top"|Window state: 0 = normal, 1 = minimized, 2 = maximized, 3 = fullscreen/kiosk
 +
|-
 +
|valign="top"|WindowType
 +
|valign="top"|RW
 +
|valign="top"|Numeric
 +
|valign="top"|Window type: 0 = modeless, 1 = modal
 
|-
 
|-
 
|}
 
|}
Line 156: Line 156:
 
|valign="top"|Add an existing object or a new object, in which case the object's class must also be specified
 
|valign="top"|Add an existing object or a new object, in which case the object's class must also be specified
 
|-
 
|-
|valign="top"|RemoveObject
+
|valign="top"|Box
|valign="top"|existing as Object
+
|valign="top"|x as Numeric, y as Numeric[, x2 as Numeric, y2 as Numeric]
|valign="top"|Remove the specified object
+
|valign="top"|Draw a box from currentx, currenty to x, y.  If x2 and y2 are specified, draw a box from x, y to x2, y2
 
|-
 
|-
|valign="top"|TextHeight
+
|valign="top"|Circle
|valign="top"|None
+
|valign="top"|radius as Numeric[, x as Numeric, y as Numeric]
|valign="top"|Return current text height setting in pixels
+
|valign="top"|Draw a circle with the specified radius at currentx, currenty. If x and y are specified, draw the circle at x, y
 
|-
 
|-
|valign="top"|TextWidth
+
|Clear
|valign="top"|text as Character
+
|None
|valign="top"|Return pixels required to display specified text
+
|Clear the form
 
|-
 
|-
 
|valign="top"|Controls
 
|valign="top"|Controls
Line 172: Line 172:
 
|valign="top"|Return an object reference to the specified control within the form
 
|valign="top"|Return an object reference to the specified control within the form
 
|-
 
|-
|Clear
+
 
|None
+
 
|Clear the form
+
|-
+
|valign="top"|Print
+
|valign="top"|text as Character
+
|valign="top"|Print the specified text in the form
+
|-
+
 
|Draw
 
|Draw
 
|None
 
|None
Line 188: Line 182:
 
|valign="top"|Draw a line from currentx, currenty to x, y.  If x2 and y2 are specified, draw a line from x, y to x2, y2
 
|valign="top"|Draw a line from currentx, currenty to x, y.  If x2 and y2 are specified, draw a line from x, y to x2, y2
 
|-
 
|-
|valign="top"|Box
+
 
|valign="top"|x as Numeric, y as Numeric[, x2 as Numeric, y2 as Numeric]
+
 
|valign="top"|Draw a box from currentx, currenty to x, y.  If x2 and y2 are specified, draw a box from x, y to x2, y2
+
|valign="top"|Print
|-
+
|valign="top"|text as Character
|valign="top"|Circle
+
|valign="top"|Print the specified text in the form
|valign="top"|radius as Numeric[, x as Numeric, y as Numeric]
+
|valign="top"|Draw a circle with the specified radius at currentx, currenty. If x and y are specified, draw the circle at x, y
+
 
|-
 
|-
 
|Release
 
|Release
 
|None
 
|None
 
|Release form
 
|Release form
 +
|-
 +
|valign="top"|RemoveObject
 +
|valign="top"|existing as Object
 +
|valign="top"|Remove the specified object
 +
|-
 +
|valign="top"|TextHeight
 +
|valign="top"|None
 +
|valign="top"|Return current text height setting in pixels
 +
|-
 +
|valign="top"|TextWidth
 +
|valign="top"|text as Character
 +
|valign="top"|Return pixels required to display specified text
 
|-
 
|-
 
|}
 
|}

Revision as of 10:11, 30 April 2013

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
Actionbar RW Boolean Whether form has an actionbar
AlwaysOnBottom RW Boolean Whether form should always be on the bottom
AlwaysOnTop RW Boolean Whether form should always be on top
AutoCenter RW Boolean Whether form is autocentered
BufferMode RW Numeric Buffer mode
Caption RW Character Text displayed in caption
Closable RW Boolean Whether form is closable
ControlCount R Numeric Number of controls in form
CurrentX RW Numeric Current x coordinate for the next drawing method
CurrentY RW Numeric Current y coordinate for the next drawing method
DrawWidth RW Numeric Line width in pixels for draw operations
ExitOnClose RW Boolean Whether to exit session on closing form
FillColor RW Numeric or Character Fill color
FillStyle RW Numeric Fill style setting
KeyPreview RW Boolean Whether keypreview is enabled
MaxButton RW Boolean Whether form has a maximize button
Message RW Character Text displayed in statusbar
MinButton RW Boolean Whether form has a minimize button
MousePointer RW Numeric Mouse pointer: 0 = arrow, 1 = arrow, 2 = cross, 3 = I-beam, 5 = size, 6 = NE/SW, 7 = size N/S, 8 = size NW/SE, 9 = size W/E, 10 = up arrow, 12 = no drop, 15 = pointing hand
Picture RW Character Filename of background image
Scrollbars RW Numeric Scrollbars: 0 = none, 1 = horizontal, 2 = vertical, 3 = both
ShowTips RW Boolean Whether tooltips are shown for controls in the form
Statusbar RW Boolean Whether form has a statusbar
Titlebar RW Boolean Whether form has a titlebar
WindowState RW Numeric Window state: 0 = normal, 1 = minimized, 2 = maximized, 3 = fullscreen/kiosk
WindowType RW Numeric Window type: 0 = modeless, 1 = modal

Methods

This class supports the Common Methods plus the following:

Method Args Description
AddObject existing as Object | newobject as Character, class as Character Add an existing object or a new object, in which case the object's class must also be specified
Box x as Numeric, y as Numeric[, x2 as Numeric, y2 as Numeric] Draw a box from currentx, currenty to x, y. If x2 and y2 are specified, draw a box from x, y to x2, y2
Circle radius as Numeric[, x as Numeric, y as Numeric] Draw a circle with the specified radius at currentx, currenty. If x and y are specified, draw the circle at x, y
Clear None Clear the form
Controls control as Numeric Return an object reference to the specified control within the form
Draw None Repaint form
Line x as Numeric, y as Numeric[, x2 as Numeric, y2 as Numeric] Draw a line from currentx, currenty to x, y. If x2 and y2 are specified, draw a line from x, y to x2, y2
Print text as Character Print the specified text in the form
Release None Release form
RemoveObject existing as Object Remove the specified object
TextHeight None Return current text height setting in pixels
TextWidth text as Character Return pixels required to display specified text

Events

This class supports the Common Events plus the following:

Event Args Description
load None Occurs before form is activated