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

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

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

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, timr@probo.com
Providenza & Boekelheide, Inc.

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.

···

On Wed, May 15, 2013 at 10:19 AM, Tim Roberts timr@probo.com wrote:

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, timr@probo.com

Providenza & Boekelheide, Inc.

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-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.