예제 #1
0
    def __init__(self, argument_control, label):
        self.argument_control = argument_control

        wx.StaticText.__init__(self,
                               argument_control,
                               label=label,
                               size=argument_control.box_size,
                               style=wx.ALIGN_CENTER_HORIZONTAL)

        old_foreground_color = self.GetForegroundColour()

        faint_color = wx_tools.mix_wx_color(0.5, old_foreground_color,
                                            wx_tools.get_background_color())
        self.SetForegroundColour(faint_color)

        self.SetMinSize(argument_control.box_size)
        self.SetMaxSize(argument_control.box_size)
예제 #2
0
 def __init__(self, argument_control, label):
     self.argument_control = argument_control
     
     wx.StaticText.__init__(self, argument_control, label=label,
                            size=argument_control.box_size,
                            style=wx.ALIGN_CENTER_HORIZONTAL)
     
     old_foreground_color = self.GetForegroundColour()        
     
     faint_color = wx_tools.mix_wx_color(0.5,
                                         old_foreground_color,
                                         wx_tools.get_background_color())
     self.SetForegroundColour(faint_color)
     
     self.SetMinSize(argument_control.box_size)
     self.SetMaxSize(argument_control.box_size)
         
예제 #3
0
파일: colors.py 프로젝트: alxerg/GarlicSim
def get_error_background_color():
    '''Get the background color of a text control which has invalid input.'''
    red = wx.Colour(255, 0, 0)
    return wx_tools.mix_wx_color(0.2, red, wx.Colour(255, 255, 255))
예제 #4
0
def get_error_background_color():
    '''Get the background color of a text control which has invalid input.'''
    red = wx.Colour(255, 0, 0)
    return wx_tools.mix_wx_color(0.2, red, wx.Colour(255, 255, 255))