hiCreateFormLayout
hiCreateFormLayout(
s_name
[ ?items l_items ]
[ ?frame g_frame ]
[ ?margins l_margins ]
[ ?spacing g_spacing ]
[ ?label_align g_labelAlign ]
[ ?horiz_align g_horizAlign ]
[ ?vert_align g_vertAlign ]
[ ?enabled g_enabled ]
[ ?invisible g_invisible ]
[ ?scrollable g_scrollable]
)
=> r_hiLayout
Description
Creates a form layout by specifying the labels, margins, spacing, and alignment.
Arguments
|
s_name
|
The symbol name of hiLayout.
|
|
?items l_items
|
Lists the fields and hiLayouts available in the hiLayout.
|
|
?frame g_frame
|
Any of the following values:
-
nil: (Default) For an unframed layout. -
t: For an untitled frame. -
t_title: For a framed layout with a title.
|
|
?margins l_margins
|
Accepts integer values or nil for 'left, 'top, 'right, and 'bottom (in the same sequence) used to apply margins. If nil is specified, then the default margins are applied.
|
|
?spacing g_spacing
|
|
|
Any of the following values:
nil: To apply the default spacing, which is inherited from its parent hiLayout or from the style.
Single integer: To specify the same horizontal and vertical spacing
List of two integers: To specify horizontal and vertical spacing (in the same sequence).
|
|
?label_align g_labelAlign
|
|
|
Specifies the horizontal alignment for the labels in the "label" column. If nil is specified, then the default label alignment is determined by the style.
Values: 'none, 'left (default), 'center, 'right, or 'justify. 'justify is specifically used only for text.
|
|
?horiz_align g_horizAlign
|
|
|
Specifies the horizontal alignment for the "field" column and can be set to none, 'left, 'center, 'right, or 'justify. 'justify is specifically used only for text.
Default value: none
|
|
?vert_align g_vertAlign
|
|
|
Specifies the vertical alignment for the "field" column and can be set to 'none, 'top, 'center, or 'bottom.
Default value: 'none
|
|
?enabled g_enabled
|
|
|
Specifies whether the fields in the layout are enabled. The default value is t.
|
|
?invisible g_invisible
|
|
|
Specifies whether the layout and the fields within are invisible. The default value is nil.
|
|
?scrollable g_scrollable
|
|
|
Adds a scroll bar in the layout if the content is large and cannot be accommodated. The default value is nil.
|
Values Returned
|
r_hiLayout
|
The defstruct for the horizontal box hiLayout and can be placed in an hiLayout form, scroll region, or tab page.
|
Examples
Creates a form layout that contains three text input fields for the first, middle, and last names, with a frame titled "Enter Full Name" using the default margins, spacing, and alignment
MyNameLayout = hiCreateFormLayout( 'MyNameLayout ?frame "Enter Full Name" ?items list (
hiCreateStringField( ?name 'MyFirstName ?prompt "First" )
hiCreateStringField( ?name 'MyMiddleName ?prompt "Middle" )
hiCreateStringField( ?name 'MyLastName ?prompt "Last" ) ) )
Specifies the field options of the Form Layout form.
procedure(ExFormLayout()
let((formLay)
formLay=hiCreateFormLayout(
'formLay
?items
list(
hiCreateBooleanButton(
?name 'enable
?buttonText "Enable"
)
hiCreateStringField(
?name 'lib
?prompt "Lib"
)
hiCreateStringField(
?name 'cell
?prompt "Cell"
)
hiCreateStringField(
?name 'view
?prompt "View"
)
)
)
hiCreateLayoutForm(
'ExFormLayoutForm
"Form Layout"
formLay
)
hiDisplayForm(ExFormLayoutForm)
)
)
Related Topics
hiLayout Form Functions
Return to top