Template
From TrillWiki
[edit] Template Control Set
NOTE: This page deals with a set of controls (listed below), not just a single control called 'template'.
Templates will probably be one of the more important windows to code in future versions of Trillian. Plugins will probably use the template controls to display all of their user interface. Templates are used in the accept file dialog boxes, Webcam windows, among other places. That said, once some people get into a rhythm with making the rest of their skins, templates have confused them at first. However, templates are probably the easiest part of the skin to make in the end.
The idea is this. You set up a template <window> with basic template icontrols, establishing a boundary for where things can be displayed. Then, you tell Trillian what buttons, edit boxes, and labels look like in your <prefs> ( controls ) section. After that Trillian does the rest. It places whatever controls and labels it needs within your established boundary and voila, a new dialog box!
One nice thing about template controls is that once you have set them up, you can use them elsewhere too, they don't have to be restricted to the template window.
Probably the most confusing part at first is that template controls, have to use specific names, like icontrols, but unlike most other controls in the skin. Below is a list of the known control names and a basic layout image to show what they do.
| Name | Type | Info |
| templateTopic | topic | Labels for edit boxes, etc. |
|---|---|---|
| templateTopicCentered | topic | A centered version of the above. |
| templateEdit | edit | One-line edit boxes, for filenames, etc. |
| templateEditMultiLine | edit | Multi-line edit boxes, for descriptions, etc. |
| templateButton | resizable-button | Buttons. Be sure to include a topic <icontrol> named "text" for arbitrary names. |
| templateMenubar | menubar | This is the menubar - for Pro 1.0 - 2.01. It shows a menu for such windows as the webcam window. (not shown on image below) As of 3.0, there are no template windows that use this control anymore since webcam is now part of the message window / contact list (however, it should be still included since it may be needed in the future and other plugins might be able to use it.) |

