SourceForge has been redesigned. Learn more.

#145 Can't save & re-open style-less dialog


I'm using the latest wxglade (cdc33fbee011).

I have a dialog that I want to save with no style(s) applied. Wxglade allows me to turn off all the styles for a dialog and then save it, but when I re-open the file, DEFAULT_DIALOG_STYLE is set again.

To recreate --
1) Create a new wxglade project
2) Add a dialog
3) On the dialog's properties pane, click the "Widget" tab. wxDEFAULT_DIALOG_STYLE is set by default.
5) Save the project
6) Re-open it. wxDEFAULT_DIALOG_STYLE is on again.

There's probably several ways to fix this problem. I hacked a fix (patch attached) but it causes other problems so maybe it's not such a great fix. My fix was in two places --
1) In, modified CheckListProperty.write() to write the property even if it is blank. With this change, wxglade will write <style></style> to the XML file if the style is blank.

2) In, modified XmlWidgetBuilder.endElement() so that even if 'data' is blank, it calls the handler anyway.

The reason that I say my patch causes problem is because the second change causes a lot of these when I re-open my .wxg file:
Warning: property 'flag' not supported by this object ('<xml_parse.Sizeritem instance="" at="" 0x10d6d238="">')

My patch does, however, fix the problem with not being able to save & re-open a dialog with no styles set.


  • Carsten Grohmann

    • status: open --> closed
    • assigned_to: Carsten Grohmann
    • Group: --> Development Version
  • Carsten Grohmann

    The reported bug is solved in the revision below. The revision will be part of the next official release.

    changeset: 1271:4e391171149f
    tag: tip
    user: Carsten Grohmann
    date: Sun Jun 23 18:51:06 2013 +0200
    summary: Fix handling of style-less dialogs and frames (sf bug #145)

    Thanks for reporting this bug.


Log in to post a comment.