What is the default unit for the Gui statement?

Started by Quin, February 15, 2025, 09:27:23 AM

Previous topic - Next topic

Quin

Kevin,
Sorry I never gave this the reply it definitely deserved back when you sent it, I read and processed it but never replied. This was incredibly helpful, thanks! After your response and asking a couple sighted people, I think I'm generally going to stick with Pixels for all my apps :)
Thanks again!

MrBcx

When PIXELS is not passed as an argument to the GUI statement, the BCX GUI controls use the system dialog units.

Dialog units are the average width and height of characters in the system font.

Internally, BCX uses the MapDialogRect function to convert dialog units to pixels and stores those coefficients
inside BCX_ScaleX and  BCX_ScaleY which are used throughout BCX GUI function landscape.

Find a BCX GUI app that does not use the PIXELS option in the GUI statement and add PIXELS to it, and the
resulting app's screen footprint and controls will always be much smaller.


Quin

Quote from: BCX help
SCALING[OPTIONAL] Either a PIXELS or DPI argument indicating that PIXELS or DPI units are to be used in the placement and size arguments declaring the control.
☞ Please note that the DPI flag is deprecated.
In many examples, I see people pass PIXELS to GUI. However, is PIXELS the default? As the docs say, DPI is deprecated, so does providing PIXELS change anything, or is it just stylistic?
Thanks.