#95 Wouldn't it be great to be able to pass styles to the ctors

Official Release
open
nobody
5
2012-10-24
2006-04-17
R_S
No

First: great work!

I have the following suggestion/issue:

When building a frame the following code is generated
by wxGlade:

class MyFrame(wxFrame):
def init(self, *args, kwds):
# begin wxGlade: MyFrame.init
kwds["style"] = wx.DEFAULT_FRAME_STYLE
wxFrame.init(self, *args,
kwds)
[...]

Now i want to programatically add some style
dependent on the user configuration(namely
wx.FRAME_NO_TASKBAR), but i don't see where to put
it. Event if i call MyFrame
(style=wx.FRAME_NO_TASKBAR) the style gets
overwritten by:
kwds["style"] = wx.DEFAULT_FRAME_STYLE

Wouldn't a generated
kwds["style"] |= wx.DEFAULT_FRAME_STYLE
be a better solution?

regards,
Ramin

Discussion

  • Logged In: YES
    user_id=375945

    You're right. I'll try to come up with a patch as soon as
    possible