[go: up one dir, main page]

Menu

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

to discuss
closed
2017-12-06
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

  • Alberto Griggio

    Alberto Griggio - 2006-05-02

    Logged In: YES
    user_id=375945

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

     
  • Dietmar Schwertberger

    Ticket moved from /p/wxglade/bugs/95/

    Can't be converted:

    • _version:
     
  • Dietmar Schwertberger

    This sounds like a good idea. I think I will add it in the next months.
    Anyway, in the latest repository version, the style handling should be more user friendly.

     

    Last edit: Dietmar Schwertberger 2017-07-13
  • Dietmar Schwertberger

    • status: open --> accepted
    • assigned_to: Dietmar Schwertberger
    • Group: --> to discuss
     
  • Dietmar Schwertberger

    • status: accepted --> closed
     
  • Dietmar Schwertberger

    I have just implemented this. It is in the repository and will be in the next release (either 0.8.0a11 or 0.8.0b1)

     

Log in to post a comment.