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:
Log into gnome 3 and select a theme like Adwaita or High Contrast.
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?
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.
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.