FormObject GitHub

πŸ“Š 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

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


[πŸ” 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