Dizmo Attributes

Dizmo attributes

Properties of a dizmo object can be read and modified with the methods getAttribute and setAttribute. This can be the title, the frame or the background of the dizmo.

// change the title of the dizmo
dizmo.setAttribute("settings/title" , "my new dizmo title");
// make the dizmo small so that only the icon can be seen
dizmo.setAttribute("state/iconized" , true);
// make the frame of the dizmo semitransparent
dizmo.setAttribute("settings/frameopacity" , 0.5);
// enable the resize button on the right side
dizmo.setAttribute("settings/usercontrols/allowResize", true);
// define the minimal width of the dizmo frame
dizmo.setAttribute("geometry/minWidth", 500);
// define the minimal height of the dizmo frame
dizmo.setAttribute("geometry/minHeight", 400);

Note: The setAttribute method may throw an exception if you write the wrong type to a attribute, or if the value you write is out of the allowed range. (e.g. "icon" has to be a boolean, or the frame opacity has to be number between 0 and 1).

For a complete list of the available attributes refer to the data tree.