Hi.
So I've been having some trouble setting window and panel styles after initialization. It seems to work just fine in Windows, but not in Ubuntu, which is my primary OS.
The difference should be visible to anyone trying to execute the code below in Windows and Linux; in Windows, I get two panels with a simple border. In Ubuntu, I get one panel with a simple border, and one panel without border.
I've tried using Update(), Refresh(), SendSizeEvent() and UpdateWindowUI(). Both on the panel in question, and on the frame itself.
I really am at a loss here, and sincerely hope there's someone out there who can shed some light on the subject... Right now, I'm tempted to write it off as a limitation in GTK and try to not depend on (or even use) this function.
So, any ideas?
//Mikael "Krank" Bergstr�m
···
---------------------------------------------------------------------------
import wx
MyApp = wx.App()
class MyKindOfBox (wx.Frame):
def __init__(self):
wx.Frame.__init__(self, None)
self.SetSizer(wx.BoxSizer(wx.VERTICAL))
self.panel1 = wx.Panel(self, -1, style=wx.SIMPLE_BORDER)
self.panel2 = wx.Panel(self, -1, style=wx.NO_BORDER)
self.panel2.SetWindowStyleFlag(wx.SIMPLE_BORDER)
self.GetSizer().Add(self.panel1, 1, wx.EXPAND | wx.ALL, border=10)
self.GetSizer().Add(self.panel2, 1, wx.EXPAND | wx.ALL, border=10)
self.Show()
MyBox = MyKindOfBox()
MyApp.MainLoop()