FormObject
| π Overview: 1 Properties | 1 Constructor | 4 Functions | 28 Getters | 26 Setters |
π Description
Creates wrapper for form object manipulation using 4D commands (defaults to current object if not specified)
π Last updated: 2025-12-10T11:45:23.003Z
π Table of Contents
- π Properties (1)
- ποΈ Constructor (1 param)
- βοΈ Functions
- Regular Functions
- setMaxFontSize (2 params)
- setBestObjectSize (1 param)
- Focus
- HighlightText (2 params)
- Computed Attributes (Getters/Setters/Query/OrderBy)
- BackgroundColor π βοΈ β
Integer - Bold π βοΈ β
Boolean - Bottom π βοΈ β
Integer - CornerRadius π βοΈ β
Integer - DisplayFormat π βοΈ β
Text - Enabled π βοΈ β
Boolean - Enterable π βοΈ β
Boolean - Font π βοΈ β
Text - FontSize π βοΈ β
Integer - ForegroundColor π βοΈ β
Integer - HasFocus π β
Boolean - Height π βοΈ β
Integer - HelpTip π βοΈ β
Text - HorizontalScrollPosition π βοΈ β
Integer - Italic π βοΈ β
Boolean - Left π βοΈ β
Integer - MaximumValue π βοΈ β
Variant - MinimumValue π βοΈ β
Variant - Multiline π βοΈ β
Boolean - PlaceholderText π βοΈ β
Text - Pointer π β
Pointer - Right π βοΈ β
Integer - Title π βοΈ β
Text - Top π βοΈ β
Integer - Underline π βοΈ β
Boolean - VerticalScrollPosition π βοΈ β
Integer - Visible π βοΈ β
Boolean - Width π βοΈ β
Integer
- BackgroundColor π βοΈ β
- Regular Functions
Properties
| Property | Type | Default | Description |
|---|---|---|---|
Name | Text | - | Name of the form object being wrapped |
Constructor
constructor
[ποΈ constructor]
Class constructor($FormObjectName : Text)
Creates wrapper for form object manipulation using 4D commands (defaults to current object if not specified)
Parameters:
| Name | Type | Optional | Description |
|---|---|---|---|
$FormObjectName | Text | - | - |
Functions
Regular Functions
setMaxFontSize
Function setMaxFontSize($MultiLine : Boolean; $UpperFontSizeLimit : Integer)
Automatically adjusts font size to largest possible while fitting within object bounds
Parameters:
| Name | Type | Optional | Description |
|---|---|---|---|
$MultiLine | Boolean | - | - |
$UpperFontSizeLimit | Integer | - | - |
setBestObjectSize
Function setBestObjectSize($HeightOnly : Boolean)
Resizes form object to best fit its content, optionally adjusting height only
Parameters:
| Name | Type | Optional | Description |
|---|---|---|---|
$HeightOnly | Boolean | - | - |
Focus
Function Focus
Moves keyboard focus to this form object
HighlightText
Function HighlightText($StartPosition : Integer; $EndPosition : Integer)
Highlights text in the form object from start to end position
Parameters:
| Name | Type | Optional | Description |
|---|---|---|---|
$StartPosition | Integer | - | - |
$EndPosition | Integer | - | - |
Computed Attributes (Getters/Setters/Query/OrderBy)
BackgroundColor
[π get, βοΈ set]
Function get BackgroundColor -> $BackgroundColor : Integer
Function set BackgroundColor($BackgroundColor : Variant)
Returns the form objectβs background color
Setter Parameter:
| Name | Type | Description |
|---|---|---|
$BackgroundColor | Variant | - |
Returns: Integer
Bold
[π get, βοΈ set]
Function get Bold -> Boolean
Function set Bold($Bold : Boolean)
Returns whether bold styling is applied to the form object
Setter Parameter:
| Name | Type | Description |
|---|---|---|
$Bold | Boolean | - |
Returns: Boolean
Bottom
[π get, βοΈ set]
Function get Bottom -> $Bottom : Integer
Function set Bottom($Bottom : Integer)
Returns the bottom coordinate of the form object
Setter Parameter:
| Name | Type | Description |
|---|---|---|
$Bottom | Integer | - |
Returns: Integer
CornerRadius
[π get, βοΈ set]
Function get CornerRadius -> Integer
Function set CornerRadius($CornerRadius : Integer)
Returns the corner radius of the form object in pixels
Setter Parameter:
| Name | Type | Description |
|---|---|---|
$CornerRadius | Integer | - |
Returns: Integer
DisplayFormat
[π get, βοΈ set]
Function get DisplayFormat -> Text
Function set DisplayFormat($DisplayFormat : Variant)
Returns the display format of the form object
Setter Parameter:
| Name | Type | Description |
|---|---|---|
$DisplayFormat | Variant | - |
Returns: Text
Enabled
[π get, βοΈ set]
Function get Enabled -> Boolean
Function set Enabled($Enabled : Boolean)
Returns whether the form object is enabled
Setter Parameter:
| Name | Type | Description |
|---|---|---|
$Enabled | Boolean | - |
Returns: Boolean
Enterable
[π get, βοΈ set]
Function get Enterable -> Boolean
Function set Enterable($Enterable : Boolean)
Returns whether the form object is enterable
Setter Parameter:
| Name | Type | Description |
|---|---|---|
$Enterable | Boolean | - |
Returns: Boolean
Font
[π get, βοΈ set]
Function get Font -> Text
Function set Font($Font : Text)
Returns the font name of the form object
Setter Parameter:
| Name | Type | Description |
|---|---|---|
$Font | Text | - |
Returns: Text
FontSize
[π get, βοΈ set]
Function get FontSize -> Integer
Function set FontSize($FontSize : Integer)
Returns the font size of the form object
Setter Parameter:
| Name | Type | Description |
|---|---|---|
$FontSize | Integer | - |
Returns: Integer
ForegroundColor
[π get, βοΈ set]
Function get ForegroundColor -> $ForegroundColor : Integer
Function set ForegroundColor($ForegroundColor : Variant)
Returns the form objectβs foreground (text) color
Setter Parameter:
| Name | Type | Description |
|---|---|---|
$ForegroundColor | Variant | - |
Returns: Integer
HasFocus
[π get only]
Function get HasFocus -> Boolean
Returns whether this form object currently has keyboard focus
Returns: Boolean
Height
[π get, βοΈ set]
Function get Height -> Integer
Function set Height($Height : Integer)
Returns the height of the form object (calculated from coordinates)
Setter Parameter:
| Name | Type | Description |
|---|---|---|
$Height | Integer | - |
Returns: Integer
HelpTip
[π get, βοΈ set]
Function get HelpTip -> Text
Function set HelpTip($HelpTip : Text)
Returns the help tip (tooltip) text of the form object
Setter Parameter:
| Name | Type | Description |
|---|---|---|
$HelpTip | Text | - |
Returns: Text
HorizontalScrollPosition
[π get, βοΈ set]
Function get HorizontalScrollPosition -> $HorizontalScrollPosition : Integer
Function set HorizontalScrollPosition($HorizontalScrollPosition : Integer)
Returns the horizontal scroll position of the form object
Setter Parameter:
| Name | Type | Description |
|---|---|---|
$HorizontalScrollPosition | Integer | - |
Returns: Integer
Italic
[π get, βοΈ set]
Function get Italic -> Boolean
Function set Italic($Italic : Boolean)
Returns whether italic styling is applied to the form object
Setter Parameter:
| Name | Type | Description |
|---|---|---|
$Italic | Boolean | - |
Returns: Boolean
Left
[π get, βοΈ set]
Function get Left -> $Left : Integer
Function set Left($Left : Integer)
Returns the left coordinate of the form object
Setter Parameter:
| Name | Type | Description |
|---|---|---|
$Left | Integer | - |
Returns: Integer
MaximumValue
[π get, βοΈ set]
Function get MaximumValue -> $MaximumValue : Variant
Function set MaximumValue($MaximumValue : Variant)
Returns the form objectβs maximum value
Setter Parameter:
| Name | Type | Description |
|---|---|---|
$MaximumValue | Variant | - |
Returns: Variant
MinimumValue
[π get, βοΈ set]
Function get MinimumValue -> $MinimumValue : Variant
Function set MinimumValue($MinimumValue : Variant)
Returns the form objectβs minimum value
Setter Parameter:
| Name | Type | Description |
|---|---|---|
$MinimumValue | Variant | - |
Returns: Variant
Multiline
[π get, βοΈ set]
Function get Multiline -> Boolean
Function set Multiline($Multiline : Boolean)
Returns whether multiline mode is enabled for the form object
Setter Parameter:
| Name | Type | Description |
|---|---|---|
$Multiline | Boolean | - |
Returns: Boolean
PlaceholderText
[π get, βοΈ set]
Function get PlaceholderText -> Text
Function set PlaceholderText($PlaceholderText : Text)
Returns the placeholder text of the form object
Setter Parameter:
| Name | Type | Description |
|---|---|---|
$PlaceholderText | Text | - |
Returns: Text
Pointer
[π get only]
Function get Pointer -> Pointer
Returns a pointer to the form objectβs variable
Returns: Pointer
Right
[π get, βοΈ set]
Function get Right -> $Right : Integer
Function set Right($Right : Integer)
Returns the right coordinate of the form object
Setter Parameter:
| Name | Type | Description |
|---|---|---|
$Right | Integer | - |
Returns: Integer
Title
[π get, βοΈ set]
Function get Title -> Text
Function set Title($Title : Text)
Returns the form objectβs title
Setter Parameter:
| Name | Type | Description |
|---|---|---|
$Title | Text | - |
Returns: Text
Top
[π get, βοΈ set]
Function get Top -> $Top : Integer
Function set Top($Top : Integer)
Returns the top coordinate of the form object
Setter Parameter:
| Name | Type | Description |
|---|---|---|
$Top | Integer | - |
Returns: Integer
Underline
[π get, βοΈ set]
Function get Underline -> Boolean
Function set Underline($Underline : Boolean)
Returns whether underline styling is applied to the form object
Setter Parameter:
| Name | Type | Description |
|---|---|---|
$Underline | Boolean | - |
Returns: Boolean
VerticalScrollPosition
[π get, βοΈ set]
Function get VerticalScrollPosition -> $VerticalScrollPosition : Integer
Function set VerticalScrollPosition($VerticalScrollPosition : Integer)
Returns the vertical scroll position of the form object
Setter Parameter:
| Name | Type | Description |
|---|---|---|
$VerticalScrollPosition | Integer | - |
Returns: Integer
Visible
[π get, βοΈ set]
Function get Visible -> Boolean
Function set Visible($Visible : Boolean)
Returns whether the form object is visible
Setter Parameter:
| Name | Type | Description |
|---|---|---|
$Visible | Boolean | - |
Returns: Boolean
Width
[π get, βοΈ set]
Function get Width -> Integer
Function set Width($Width : Integer)
Returns the width of the form object (calculated from coordinates)
Setter Parameter:
| Name | Type | Description |
|---|---|---|
$Width | Integer | - |
Returns: Integer
Generated from FormObject.4dm