GenericMessageDialog issues

Hi,

I am using Andrea’s cool GenericMessageDialog widget to display a message in one of my new programs. For some reason, it keeps showing two buttons instead of one. It will show an OK button and an Help button when it should only show the OK one. I have attached an example. I am using the latest SVN version of the dialog and made sure to delete the pyc file just in case that was the issue. I have tested on two Windows XP Professional machines with Python 2.5 and wxPython 2.8.10.1. Thanks a lot for any ideas!

msgBox.py (532 Bytes)

···

Mike Driscoll

Blog: http://blog.pythonlibrary.org

To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com

or visit http://groups.google.com/group/wxPython-users?hl=en

Hi Mike,

Hi,

I am using Andrea's cool GenericMessageDialog widget to display a message in
one of my new programs. For some reason, it keeps showing two buttons
instead of one. It will show an OK button and an Help button when it should
only show the OK one. I have attached an example. I am using the latest SVN
version of the dialog and made sure to delete the pyc file just in case that
was the issue. I have tested on two Windows XP Professional machines with
Python 2.5 and wxPython 2.8.10.1. Thanks a lot for any ideas!

The latest SVN for GenericMessageDialog was updated yesterday evening
(UK time), and the constructor has slightly changed from:

def __init__(self, parent, message, caption, style,
                 pos=wx.DefaultPosition, size=wx.DefaultSize):

To:

def __init__(self, parent, message, caption, agwStyle,
                 pos=wx.DefaultPosition, size=wx.DefaultSize,
                 style=wx.DEFAULT_DIALOG_STYLE|wx.WANTS_CHARS):

So you should call your GMD like this:

dlg = GMD.GenericMessageDialog(None,
                                   "Your machine is about to lock",
                                   "Warning",
                                   agwStyle=wx.ICON_WARNING|wx.OK,
                                   style=wx.DEFAULT_DIALOG_STYLE|wx.WANTS_CHARS|
                                            wx.STAY_ON_TOP)

I believe it should work as you intended now.

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/

==> Never *EVER* use RemovalGroup for your house removal. You'll
regret it forever.
The Doomed City: Removal Group: the nightmare <==

···

On 21 April 2010 15:47, Mike Driscoll wrote:

--
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en

Hi Andrea,

···

On Wed, Apr 21, 2010 at 9:57 AM, Andrea Gavana andrea.gavana@gmail.com wrote:

Hi Mike,

On 21 April 2010 15:47, Mike Driscoll wrote:

Hi,

I am using Andrea’s cool GenericMessageDialog widget to display a message in

one of my new programs. For some reason, it keeps showing two buttons

instead of one. It will show an OK button and an Help button when it should

only show the OK one. I have attached an example. I am using the latest SVN

version of the dialog and made sure to delete the pyc file just in case that

was the issue. I have tested on two Windows XP Professional machines with

Python 2.5 and wxPython 2.8.10.1. Thanks a lot for any ideas!

The latest SVN for GenericMessageDialog was updated yesterday evening

(UK time), and the constructor has slightly changed from:

def init(self, parent, message, caption, style,

             pos=wx.DefaultPosition, size=wx.DefaultSize):

To:

def init(self, parent, message, caption, agwStyle,

             pos=wx.DefaultPosition, size=wx.DefaultSize,

             style=wx.DEFAULT_DIALOG_STYLE|wx.WANTS_CHARS):

So you should call your GMD like this:

dlg = GMD.GenericMessageDialog(None,

                               "Your machine is about to lock",

                               "Warning",

                               agwStyle=wx.ICON_WARNING|wx.OK,

                               style=wx.DEFAULT_DIALOG_STYLE|wx.WANTS_CHARS|

                                        wx.STAY_ON_TOP)

I believe it should work as you intended now.

Andrea.

I figured I was missing something when it came to the new agwStyle parameter. Thanks for the assist. That definitely fixed the Help button issue.

Mike Driscoll

Blog: http://blog.pythonlibrary.org

To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com

or visit http://groups.google.com/group/wxPython-users?hl=en