Different result on different OS
Andrea
amarin at mr-service.it
Thu Apr 5 09:54:35 PDT 2007
Hi all,
I have a little code that work well under linux and work in different
way under windows.
Code:
class MainWindow(wx.Frame):
def __init__(self, parent, id, title):
wx.Frame.__init__(self, parent, id, title, wx.DefaultPosition,
wx.Size(550, 450))
...
...
localmrLbl = wx.StaticText(self.panel, -1, 'Total local cost MR:', pos =
(5, 105))
self.localmr = wx.TextCtrl(self.panel, -1, '', pos = (200, 105), size =
(140, -1))
self.localmr.SetBackgroundColour('#ffdf85')
self.localmr.Disable()
...
already this part work different because on linux I see the textctrl
disabled but the back ground is #ffdf85, on windows it is disabled but
the back ground is the default colour.
...
...
c = wx.Button(self.panel, -1, 'Calculate', pos = (300, 255))
self.Bind(wx.EVT_BUTTON, self.OnCalculate, c)
...
...
def OnCalculate(self, event):
...
...
self.localmr.Enable()
self.localmr.SetValue(unicode(tot_localmr))
self.localmr.SetBackgroundColour('#FFDEAD')
...
...
Now there is the question, on linux when I click on calculate button I
see that the textctrl change colour immediately, under windows for see
that colours change I must click into the texccrl.
Maybe I make a mistake but I don't understand where.
Thanks Andrea
More information about the wxpython-users
mailing list