[Boa Constr] seeting color dynamically
Status: Beta
Brought to you by:
riaan
From: Thomas T. <th...@ef...> - 2006-04-12 02:41:29
|
Hi All, I am using Boa in developing my python app..=20 I need to change the background color of some controls based on ceratin = parameters.. But if I use a variable to set the color I can't use the the frame = designer any more. an eg is self.panel6 =3D wx.Panel(id=3DwxID FRAME1PANEL6, = name=3D'panel6', parent=3Dself.leftButtonPanel, pos=3Dwx.Point(0, 0), = size=3Dwx.Size(133, 16), style=3Dwx.RAISED BORDER | wx.TAB TRAVERSAL) self.panel6.SetBackgroundColour(wx.Colour(102, 102, 102)) self.panel6.SetBestFittingSize(wx.Size(133, 16)) so if I define PANEL COLOR RED=3Dwx.Colour(255, 0, 0) and use=20 self.panel6 =3D wx.Panel(id=3DwxID FRAME1PANEL6, = name=3D'panel6', parent=3Dself.leftButtonPanel, pos=3Dwx.Point(0, 0), = size=3Dwx.Size(133, 16), style=3Dwx.RAISED BORDER | wx.TAB TRAVERSAL) self.panel6.SetBackgroundColour(PANEL COLOR RED) self.panel6.SetBestFittingSize(wx.Size(133, 16)) I can't use the frame designer any more.. any help here.. cheers ----------------------------------------------------- Thomas Thomas phone +64 7 855 8478 fax +64 7 855 8871 |