Creating a derived widget

A derived widget is a widget descended directly from another base widget.  It is created by altering default properties of the base widget using the pui.toolbox.add() API.  For more details about this API, refer to the Widgets Development API section of the documentation.

For widgets with a complex custom HTML layout, you may use an "html container" as the base widget with EJS Templating. Any dynamic data can be bound to the "value" or the "user defined data" properties of the widget.


The following is a custom variation of a List Box:

pui.toolbox.add({ category: "Custom Widgets", widget: "select box", text: "Custom List Box", icon: "/profoundui/proddata/images/icons/list_box.png", proxyHeight: 86, proxyWidth: 150, proxyHTML: '<select size="5" style="font-family: Sans-Serif; width: 150px; color: #666666; background-color: #FAE4AA; font-size: 12px"><option>Choice 1</option><option>Choice 2</option><option>Choice 3</option><option>Choice 4</option><option>Choice 5</option></select>', // any property of a "select box" can be altered here defaults: { "select box height": "5", "width": "150px", "color": "#666666", "background color": "#FAE4AA", "choices": "Choice 1,Choice 2,Choice 3,Choice 4,Choice 5", "font family": "Sans-Serif", "font size": "12px" } });