GuiSize - DfBaseWindow
Determines the size (height and width) of the object expressed in physical pixels
Type: Property
Access: Read/Write
Data Type: FoldedInteger
Parameters: None
Parameters
| Parameter | Type | Description |
|---|---|---|
| iHeight | Integer |
Syntax
Property FoldedInteger GuiSize
| Access Type | Syntax |
|---|---|
| Read Access: | Get GuiSize to FoldedIntegerVariable |
| Write Access: | Set GuiSize to FoldedIntegerVariable/Value |
Description
GuiSize determines the size (height and width) of the object expressed in physical pixels (the native display-coordinate system).
Window Bounding and Client Area Sizing
The pbSizeToClientArea property in container objects allows for sizing to be based on a container's window bounding (outer) size or (inner) client area size. When True, client area sizing is used and sizing properties Size, GuiSize, piMinSize, and piMaxSize will apply to the window's client area. When False, these properties apply to the outer, non-client area.
All other objects use window bounding sizing (outer sizing).
When this property is set, two integer parameters are passed as specified in the parameter list. When the value of the property is retrieved, the value of these two properties is returned as a folded integer. The value of these parameters can be accessed using the hi() and low() functions.
The property is set as follows:
Set GuiSize to iHeight iWidth
The property is retrieved as follows:
Get GuiSize to iValue
Move (Hi(iValue)) to iHeight
Move (Low(iValue)) to iWidth
Of Note
Normally objects are sized using the size message which uses logical coordinates (usually dialog units). Setting logical coordinates also sets the physical (gui) coordinates.
If an object's size is set using the GuiSize message, the Adjust_Logicals message should be sent to adjust the object's logical coordinates.
Procedure Example
Integer iHeightWidth iHeight iWidth
Get GuiSize to iHeightWidth
Move (Hi(iHeightWidth)) to iHeight
Move (Low(iHeightWidth)) to iWidth
Set GuiSize to (iHeight +20) (iWidth+10)
Send Adjust_Logicals
End_Procedure
GuiToDialog and DialogToGui can be used to convert Gui and Dialog metrics.
See Also
GuiLocation | pbSizeToClientArea | piMinSize | piMaxSize | Size | GuiWindowSize | GuiClientSize | Location