def on_btnForegroundColor_mouseClick(self, event): result = dialog.colorDialog(self) if result.accepted: color = result.color # print color self.components.btnButton.foregroundColor = color self.components.fldTextField.foregroundColor = color self.components.fldPasswordField.foregroundColor = color self.components.fldTextArea.foregroundColor = color self.components.txtStaticText.foregroundColor = color self.components.chkCheckBox.foregroundColor = color self.components.chkToggleButton.foregroundColor = color self.components.radRadioGroup.foregroundColor = color self.components.popChoice.foregroundColor = color self.components.lstList.foregroundColor = color self.components.sldSlider.foregroundColor = color self.components.imgImage.foregroundColor = color self.components.imgImageButton.foregroundColor = color self.components.fldTextFieldNoBorder.foregroundColor = color self.components.calCalendar.foregroundColor = color self.components.cmbComboBox.foregroundColor = color self.components.gagGauge.foregroundColor = color self.components.spnSpinner.foregroundColor = color self.components.linStaticLine.foregroundColor = color self.components.stbStaticBox.foregroundColor = color
def on_color_command(self, event): which = event.target.name.replace("clr", "") result = dialog.colorDialog(self, color=util.colorFromString(self.components["fld"+which].text)) if result.accepted: self.components["fld"+which].text = str(result.color) self.components["clr"+which].backgroundColor = util.colorFromString(self.components["fld"+which].text) self.updateComponent(which)
def on_btnBackgroundColor_mouseClick(self, event): result = dialog.colorDialog( self, color=util.colorFromString( self.components.fldBackgroundColor.text)) if result.accepted: self.components.fldBackgroundColor.text = str(result.color)
def on_wColor_mouseClick(self, event): result = dialog.colorDialog(self, color=util.colorFromString( self.components.wField.text)) if result.accepted: self.components.wField.text = str(result.color) if self.autoAttributeUpdate: self.updateComponent()
def on_btnBackgroundColor_mouseClick(self, event): result = dialog.colorDialog(self) if result.accepted: color = result.color for w in self.components.itervalues(): if w.__class__.__name__.startswith(w.name[3:]): w.backgroundColor = color self.components.fldTextFieldNoBorder.backgroundColor = color
def on_btnChooseColor_mouseClick(self, event): comp = self.components result = dialog.colorDialog(self, color=comp.colorDisplay.backgroundColor) if result.accepted: my_color = result.color comp.colorDisplay.backgroundColor = my_color comp.sliderRed.value = my_color[0] comp.sliderGreen.value = my_color[1] comp.sliderBlue.value = my_color[2] self.updateColor()
def on_btnColor_mouseClick(self, event): result = dialog.colorDialog(self) if result.accepted: self.components.bufOff.foregroundColor = result.color event.target.backgroundColor = result.color
def on_btnBgBackgroundColor_mouseClick(self, event): result = dialog.colorDialog(self) if result.accepted: color = result.color self.backgroundColor = color
def on_buttonColor_mouseClick(self, event): result = dialog.colorDialog(self) self.components.fldResults.text = "colorDialog result:\naccepted: %s\nColor: %s" % ( result.accepted, result.color)