Recent Changes - Search:

Administrators

Developers

Articles

Cookbook

edit

attributes Property

This is a placeholder property for attaching custom attributes to a widget.

Syntax

QuiX XML
<qx:rect xmlns:qx="http://www.innoscript.org/quix">
    <qx:prop name="my_custom1" value="a string"/>
    <qx:prop name="my_custom2" type="int" value="1"/>
</qx:rect>
JavaScriptwidget.attributes["my_custom1"] = "a string";
widget.attributes["my_custom2"] = 1;

Possible values

It is clear that when setting a custom attribute with scripting, the assigned value can be of any type. When setting a custom attribute using QuiX markup - using the prop tag - the supported types are:

  • If the "type" attribute is set to "str" or ommited then the value type is considered to be a string.
  • If the "type" attribute is set to "int" the value type is integer.
  • If the "type" attribute is set to "float" the value type is float.
  • If the "type" attribute is set to "bool" the value type is boolean (possible values are "0" and "1").
  • If the "type" attribute is set to "strlist" the value type is an array of strings. In this case you can specify the string delimiter by using the "delimiter" attribute. The default delimiter is the ";".
Page last modified on February 03, 2007, at 11:33 PM