How to create your own control?
Common structure of control:
dhx.protoUI({ name:"controlName", defaults:{ template:"..." } setValue:function(value){...}, getValue:function()(...} }, dhx.ui.button);
In the code above, a new control will inherit from button. If your new element is more similar to other control, just replace button with its name, e.g. 'dhx.ui.text'.
You may not define setValue() and getValue() functions. In this case, the default processing, specified for control you inherit from, will be applied.