Bambookit Home    Bambookit GUI Tutorial

Back    Next   

II. GUI Basics

Chapter 8. Prebuilt Widgets




Popup Colorpicker Control

Popup Colorpicker Control. Popup Calendar Control is composed of a Combobox, Widget and Button elements. The Button widget is described in the Chapter 7, Widgets.

The Popup Colorpicker allows to pick the color from one of the buttons in popup widget, and sets this color to the main panel.

XML Element Name

<Combobox> <Widget> <Button/> <Button/> <Button/> <Button/> </Widget> </Combobox>

Examples - Popup Color Picker

A simple XML script for creating a Popup Colorpicker control
<Widget setSize="120,80" setName="main" setLayout="iconviewx,100,25,0"> <Combobox setLabel="Color picker"> <Widget setSize="50,40" setBorder="roundraised" setLayout="iconviewx,10,10,0"> <Button setBackground="FFFFFF" setLabel="FFFFFF" setForeground="FFFFFF" addActionTarget="main,action,setBackground='FFFFFF'" setBorder="none" setFocusTraversable="false"/> <Button setBackground="CCCCCC" setLabel="CCCCCC" setForeground="CCCCCC" addActionTarget="main,action,setBackground='CCCCCC'" setBorder="none" setFocusTraversable="false"/> <Button setBackground="999999" setLabel="999999" setForeground="999999" addActionTarget="main,action,setBackground='999999'" setBorder="none" setFocusTraversable="false"/> <Button setBackground="666666" setLabel="666666" setForeground="666666" addActionTarget="main,action,setBackground='666666'" setBorder="none" setFocusTraversable="false"/> <Button setBackground="333333" setLabel="333333" setForeground="333333" addActionTarget="main,action,setBackground='333333'" setBorder="none" setFocusTraversable="false"/> <Button setBackground="000000" setLabel="000000" setForeground="000000" addActionTarget="main,action,setBackground='000000'" setBorder="none" setFocusTraversable="false"/> <Button setBackground="FFCC00" setLabel="FFCC00" setForeground="FFCC00" addActionTarget="main,action,setBackground='FFCC00'" setBorder="none" setFocusTraversable="false"/> <Button setBackground="FF9900" setLabel="FF9900" setForeground="FF9900" addActionTarget="main,action,setBackground='FF9900'" setBorder="none" setFocusTraversable="false"/> <Button setBackground="FF6600" setLabel="FF6600" setForeground="FF6600" addActionTarget="main,action,setBackground='FF6600'" setBorder="none" setFocusTraversable="false"/> <Button setBackground="FF3300" setLabel="FF3300" setForeground="FF3300" addActionTarget="main,action,setBackground='FF3300'" setBorder="none" setFocusTraversable="false"/> </Widget> </Combobox> </Widget> setLayout property is exlained in the Chapter 14, Auto Layout, Advanced Features.
setLabel attribute is exlained in the Chapter 10, Widgets Attributes, GUI Basics.
setBackground style is exlained in the Chapter 9, Widgets Styles, GUI Basics.
setForeground style is exlained in the Chapter 9, Widgets Styles, GUI Basics.
setBorder style is exlained in the Chapter 9, Widgets Styles, GUI Basics.
Action event is exlained in the Chapter 11, Events, Event Handling.




Back    Next