hiSetLayoutMargins
hiSetLayoutMargins(
l_margins
g_formRegionOrLayout
[ s_layoutName ]
)
=> t / nil
Description
Set the top, bottom, left, and right margins of the layout.
Arguments
|
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.
|
|
g_formRegionOrLayout
|
|
|
Any of the following:
-
hiLayout form
-
Scroll region or tab page in hiLayout form
-
hiLayout
|
|
s_layoutName
|
The hiLayoutSymbol for an hiLayout contained with the form or region. This argument is ignored if g_formRegionOrLayout is a hiLayout.
If g_formRegionOrLayout is a form or region and s_layoutName is not specified, the main hiLayout of the form or region is used.
|
Values Returned
|
t
|
True, if:
-
The arguments resolve to a valid hiLayout.
-
The
l_margins argument is invalid but a valid hiLayout is referenced, a warning is issued and the margins are unchanged. -
l_margins is valid and the margins are updated.
|
|
nil
|
Arguments does not resolve to a valid hiLayout.
|
Examples
In MyForm, with main layout, MyMainLayout, the left and right margins of the main layout are changed to 5 and the top margin to 8. The bottom margin remains unchanged.
hiSetLayoutMargins( list( 5 8 5 nil ) MyForm )
hiSetLayoutMargins( list( 5 8 5 -1 ) MyForm->MyMainLayout )
hiSetLayoutMargins( list( 5 8 5 nil ) MyForm 'MyMainLayout )
=> t
Related Topics
Form and Field Functions
Return to top