def __set_label_colour(self, label_object_name, colour="red"):
'''
@summary: Sets the specified label text colour and refreshes the object
'''
# Set colour string
if colour == "red":
colour_object = "wx.Colour (255,0,0)"
elif colour == "default":
colour_object = "wx.SystemSettings.GetColour( wx.SYS_COLOUR_WINDOWTEXT )"
# Change foreground colour
exec("self.%s.SetForegroundColour( %s )" %
(label_object_name, colour_object)
)
# Refresh object appearance
exec("self.%s.Hide()" % label_object_name)
exec("self.%s.Show()" % label_object_name)
评论列表
文章目录