[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

#### 4.19.9.3 Widget Identifiers

On occasion you may need to name a widget, in order to identify it for some future operation. Consider the example below.

    <layout type="page">
    	<widget type="Gauge" id="myGauge">
    		<type>{Skin.current.Style.GaugeLevel}</type>
    		<title>My Gauge</title>
    		<min>0</min>
    		<max>100</max>
    	</widget>
    	<widget type="Slider" id="mySlider">
    		<vertical>{true}</vertical>
    		<step>25</step>
    		<lock>{false}</lock>

    		<event name="onChange" action="function() { myGauge.value = mySlider.value; }" />
    	</widget>
    </layout>

By using the "id" attribute, you can given a widget a name that is referenceable later. Note that the names need to be globally unique, since they are created in the global namespace.

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ]

This document was generated using texi2html 1.76.