ColorSelectWidget¶
from flexx import event, ui
class Example(ui.Widget):
def init(self):
self.c = ui.ColorSelectWidget()
@event.reaction
def _color_changed(self):
self.node.style.background = self.c.color.hex
-
class
flexx.ui.
ColorSelectWidget
(*init_args, **kwargs)¶ Inherits from:
Widget
A widget used to select a color.
The
node
of this widget is an <input> element of typecolor
. This is supported at least on Firefox and Chrome, but not on IE.emitters: user_color
actions: set_color, set_disabled
-
color
¶ ColorProp – The currently selected color.
-
disabled
¶ BoolProp – Whether the color select is disabled.
-
set_color
(*val)¶ action – Setter for the ‘color’ property.
-
set_disabled
(*val)¶ action – Setter for the ‘disabled’ property.
-
user_color
(color)¶ emitter – Event emitted when the user changes the color. Has
old_value
andnew_value
attributes.
-