Contents Up Previous Next

Multi-platform development

.wxr files generated on one environment (e.g. Windows) can be used in another (e.g. GTK). If you use default fonts and colouring (set useSystemDefaults to True in the dialog properties) then the dialog fonts and colours will take on the native values, rather than ones specified in the resource. Without this, colours in the dialog resource may not match system colours.

Also, set useDialogUnits to True whenever possible since this will cause the dialog to be created using a scale based on the current system font size, and will result in dialogs that are portable between screen resolutions as well as platforms.

Because the same control can have different sizes on different GUIs, the user should be cautious in assuming that one resource file will work for all platforms. It may be better to plan to conditionally include or load different resource files for different platforms, with spacing modified to suit each environment. The best thing is to try your dialog resource on several platforms and see whether tweaking is required for some platforms.