- Foreword
- Basics
- Interface
- Menu
- File
- Import
- Edit
- View
- Options
- Options
- Tools
- Help
- Windows & Dialogs
- Controls
- Standard
- Additional
- Win32
-
- Property Editors
- Appendices
The default appearance of controls can be modified. For example:
To change the default properties of one or more controls, a file control_templates.xml must be created in the Koda directory. The properties of object types defined in it will override Koda's defaults.
Extras\Control Templates\control_templates.xml is an example. It is listed below.
<control_templates> <object type="TAForm"> <properties> <property name="Width" vt="Int8">600</property> </properties> <components/> </object> <object type="TAButton" name="Btn%INSTANCE%"> <properties> <property name="Width" vt="Int8">100</property> <property name="Height" vt="Int8">30</property> <property name="CtrlStyle" vt="Int32">1342291968</property> </properties> <components/> </object> </control_templates>
It overrides Koda's installation defaults. It changes:
All other default properties remain as installed.
The value of <color red>CtrlStyle</color> (and of <color red>Style</color>) is a 32-bit signed-integer combination of Windows styles.
Note <color red>Btn%INSTANCE%</color>. %INSTANCE% is essential. Without it, Koda will try to create buttons Btn, Btn, etc. - and will fail!
The format of the file is critically important. The safest way of creating your own control_templates.xml is to copy appropriate chunks from one of your form (.kxf) files.
Creating control_templates.xml in the Koda directory safeguards against making unintended changes that you cannot easily correct.