Syntax
PaddingLeft = LayoutGetPadding(Layout, *PaddingLeft.Integer=#Null, *PaddingTop.Integer=#Null, *PaddingRight.Integer=#Null, *PaddingBottom.Integer=#Null)Description
Retrieves the padding values for the specified layout container. Padding is the space between the layout's border and its content.
Parameters
Layout
The handle of the layout object whose padding is to be retrieved. If
#Null, it targets the current layout.
*PaddingLeft.Integer (optional)
A pointer to an integer variable that will receive the left padding
value.
*PaddingTop.Integer (optional)
A pointer to an integer variable that will receive the top padding
value.
*PaddingRight.Integer (optional)
A pointer to an integer variable that will receive the right padding
value.
*PaddingBottom.Integer (optional)
A pointer to an integer variable that will receive the bottom padding
value.
Return Value
Returns the left padding value as an Integer. Returns
#False (0) if the layout handle is invalid. The other
padding values are returned via the optional pointers.
Example
IncludeFile "ProGUI_PB.pbi"
StartProGUI()
MyWindow = CreateWindow(0, 0, 400, 300, "Get Layout Padding")
If MyWindow
LayoutSetPadding(#Null, 15) ; Set all padding to 15
LayoutSetPaddingTop(#Null, 25) ; Override top padding
; Retrieve all padding values
LayoutGetPadding(#Null, @PadL, @PadT, @PadR, @PadB)
Debug "Padding - Left: " + PadL + ", Top: " + PadT + ", Right: " + PadR + ", Bottom: " + PadB
WindowShow(MyWindow, #True, #PG_WindowShow_ScreenCentered)
Repeat
Event = WaitWindowEvent()
Until Event = #PB_Event_CloseWindow
EndIf
StopProGUI()See Also
LayoutSetPadding, LayoutSetPaddingTop, LayoutSetPaddingRight, LayoutSetPaddingBottom, LayoutSetPaddingLeft, LayoutGetPaddingLeft, LayoutGetPaddingTop, LayoutGetPaddingRight, LayoutGetPaddingBottom
Supported OS
Windows, Linux