This shows you the differences between two versions of the page.
koda:en:documentation:appendice_control_templates [2014/07/10 10:47] |
koda:en:documentation:appendice_control_templates [2014/07/10 10:47] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== 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 // | ||
+ | |||
+ | 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. | ||
+ | |||
+ | <code xml> | ||
+ | < | ||
+ | <object type=" | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | < | ||
+ | </ | ||
+ | <object type=" | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | It overrides Koda's installation defaults. It changes: | ||
+ | * the default Width of forms, <color red> | ||
+ | * the default size of buttons, <color red> | ||
+ | * the default style of buttons from <color blue> | ||
+ | |||
+ | All other default properties remain as installed. | ||
+ | |||
+ | //The value of <color red> | ||
+ | |||
+ | Note <color red> | ||
+ | |||
+ | 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. =) |