Introduction de Freak :
When developing crossplatform programs, one problem is the difference in font sizes among the OS. But even when developing only for Windows, it is a good practice to not assume a fixed font size as that will look bad for people who use a larger default font as well.

The following procedure is used by the PureBasic IDE to adjust gadget sizes to fit the text they contain. This allows the IDE dialogs to look good with any font size and also allows translated text to fit even if it is longer than the default text.

Of course with this you need a more complex code to arrange/resize the gadgets, but as you can see below when this is done you can even change the font (or gadget content) on the fly and easily resize the gadgets to fit.