Syntax
Success = BorderSetDpiScaling(Border, isEnabled.b)
Description
Enables or disables automatic DPI scaling for the specified border object (applies to both generated and image borders).
Parameters
Border
The handle of the border object.
isEnabled.b
Set to #True to enable DPI scaling (default behavior) or
#False to disable it.
Return Value
Returns #True if the setting was successfully applied, or #False if the border
handle is invalid.
Remarks
When DPI scaling is enabled, ProGUI automatically adjusts border widths, radii, slice offsets, and edge scaling factors based on the current drawing context's DPI. If disabled, the border uses its defined pixel values directly, which might result in the border appearing smaller or larger relative to other elements on displays with different DPI settings than the one it was designed for (typically 96 DPI).
Example
IncludeFile "ProGUI_PB.pbi"
StartProGUI()
MyBorder = CreateBorder(#PG_Border_Solid, 5)
If MyBorder
; Disable DPI scaling - the border will always try to be 5 pixels wide
If BorderSetDpiScaling(MyBorder, #False)
Debug "Border DPI scaling disabled."
EndIf
FreeBorder(MyBorder)
EndIf
StopProGUI()
See Also
BorderGetDpiScaling, CreateBorder, CreateBorderImg
Supported OS
Windows, Linux