====== Control templates ======
The default appearance of controls can be modified. For example:
* The default width of Button controls can be changed
* As installed, Koda defaults to naming Button controls //Button1//, //Button2// ... A control template can change the default names to //Btn1//, //Btn2//, etc.
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.
It overrides Koda's installation defaults. It changes:
* the default Width of forms, TAForm, to 600 pixels
* the default size of buttons, TAButton, to 100 x 30 pixels
* the default style of buttons from BS_PUSHBUTTON (to BitOr(BS_PUSHBUTTON, BS_FLAT)
All other default properties remain as installed.
//The value of CtrlStyle (and of Style) is a 32-bit signed-integer combination of Windows styles.//
Note Btn%INSTANCE%. %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. =)