|
Custom Properties <prop> |
|
|
You can define custom properties for the library elements depending on your needs. These custom properties are defined with <prop> tags inside the element. Example: <editbox name="username"> <rect>0,0,100,26</rect> <prop name="usertype" caption="User Type" type="dropdown" options="Intranet,Internet">Internet</prop> </editbox>
The definition syntax <prop name=".." caption=".." type=".." rules=".." options=".." restr=".." helpbm=".." >initial value</prop>
Nested usage is also possible to construct property groups.
<prop name=".." caption=".." type="propgroup"> <prop name=".." caption=".." type=".."/> <prop name=".." caption=".." type="..">initial value</prop> </prop>
Attributes name The name of the property. It must be unique and reserved property names cannot be used. caption The value of this attribute is displayed on the left hand side of the property editor. A meaningful text that describes the property should be given. If omitted the name is used as the caption <prop name="dbname" type="string" caption="Database Name"/>
rules
<prop name="dbname" rules="ro" type="string">Computer_Shop</prop>
options Is used to define the list of the options. Applicable to "dropdown" and "combo" types. The values should be seperated with ','. Example: <prop name="resolution" type="dropdown" options="480x640,600x800,768x1024"/>
restr Is used to define a restriction. Applicable to types file, elmselect, dslist and proclist .
Example: <prop name="scriptfile" type="file" restr="*.js"/>
helpbm Defining a Help Bookmark is meaningful when a Help File is defined with <helpfile> property. The value given here should be a bookmark in the help file. When user presses F1 key as he focuses on this property on the property editor the help file will be opened and the help page that has this bookmark will be displayed. Example: <panel name="QuickMenu"> <helpfile>QuickMenu.chm</helpfile> <prop name="menucolor" type="color" helpbm="menucolor"/> </panel>
type Is the type of the property. See Property Types.
|