Navigator > Setup > Form Designer > Code tab >
Objects (Alt+J) > Self
The Self object reports details of the form being designed.
Select a field form the list, and it will be inserted into the Code window. For example, if you click the Name field, Self.Name will be inserted in the code window. Several fields represent the Form Properties.
Fields available are:
Field |
Description |
ActiveProperty |
Returns the name of the Property on the form that is active. |
AlignWithMargins |
Form AlignWithMargins property value. |
BorderStyle |
Form BorderStyle property value. |
BorderWidth |
Form BorderWidth property value. |
Caption |
Form Caption property value. |
ClassName |
Returns the ClassName of the Form object. |
ClientHeight |
Form ClientHeight property value. |
Color |
Form Color property value. |
Constraints |
Enter a constraint, to return the constraint property value. Available values are:
|
Enabled |
Form Enabled property value. |
Font |
Select a Font Property from the list. The Font can affect components on the form with ParentFont set to True. See Font Properties. |
Height |
Form Height property value. |
IsCustomForm |
Returns True for Custom forms. For Form Designer Forms, this always returns True. |
IsFloatingWindow |
Returns True for forms in a floating window state, returns False otherwise. |
Margins |
Enter a margin, to return the margin property value. Available values are:
|
ModalResult |
Returns True when the form is being displayed modally, returns False otherwise. |
Name |
The Form Name. This can be set in the code. |
Padding |
Enter a padding value, to return the padding property value. Available values are:
|
SaveSizeName |
Form SaveSizeName property value. |
TabCaption |
TabCaption can be set explicitly in code e.g. where a shorter caption is wanted for Tabbed maximised forms. Synchronisedwith FD Form Caption on change of Caption if both were the same prior to the change. |
Visible |
Form Visible property value. |
Width |
Form Width property value. |
WindowState |
Form WindowState property value. |
Methods available to the Self Object are:
Method |
Description |
Bring the form in front of other windows. |
|
Closes the form. |
|
Forces the form to the front with focus. |
|
Returns the value of a property of the component. |
|
Hide the form. |
|
Returns the type of a property for the component. |
|
Returns a number of pixels at the scaled size, based on the number provided. |
|
Moves the form behind other windows. |
|
Set the focus to the component. |
|
Sets the value of a property of the component. |
|
Show the form. |
|
Show an error hint for the component. Specify the hint. |
|
Show an error hint for a component on the form. |
|
Show the form in a modal state. |
|
Show a status hint for the component. Specify the hint. |