wxPython and GTK/Gnome3 - missing close/minimize/maximize boxes

103 views
Skip to first unread message

Rish

unread,
May 14, 2013, 5:43:28 PM5/14/13
to wxpytho...@googlegroups.com
Hi all,

I'm looking at creating an application for Linux and I'm running into a problem.  Some of the themes remove the close/minimuze/maximize buttons in a dialog!

Steps to repro:

1. Log into gnome 3 and select a theme like Adwaita or High Contrast.
2. Run the following script:

import wx

class MyApp(wx.App):
    def OnInit(self):
        wx.MessageBox("Hello wxPython", "wxApp")
        return True

if __name__ == "__main__":
    app = MyApp(False)
    app.MainLoop()

You can see in the screenshots I've attached the difference.  Any suggestions to force show the buttons?  Has anyone else seen this issue?

Any help appreciated.

Thanks much,

-R
missing.png
normal.png

Mike Driscoll

unread,
May 15, 2013, 11:34:57 AM5/15/13
to wxpytho...@googlegroups.com
Hi,

It appears that one theme supports those extra buttons and the other doesn't. wxPython just obeys what the OS tells it to do regarding native widgets. If you always want the minimize and close buttons, then create a custom dialog with wx.Dialog.

- Mike

Tim Roberts

unread,
May 15, 2013, 1:19:17 PM5/15/13
to wxpytho...@googlegroups.com
Rish wrote:
>
> I'm looking at creating an application for Linux and I'm running into
> a problem. Some of the themes remove the close/minimuze/maximize
> buttons in a dialog!

That's not a dialog. That's a message box. There's a difference.
wx.MessageBox simply uses the native API to do the job.

--
Tim Roberts, ti...@probo.com
Providenza & Boekelheide, Inc.

Rishi Sharma

unread,
May 16, 2013, 2:15:57 PM5/16/13
to wxpytho...@googlegroups.com
I understand.  I used that as a simple example.  I can repro this with a wx.Dialog style as well.

However what I found is that if I use a wx.Frame with the Show method it does indeed work as expected (versus wx.Dialog with Show Modal - I haven't tested wx.Dialog with Show just yet).  So it seems this issue has more to do with modality.



--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-user...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



Reply all
Reply to author
Forward
0 new messages