Positioning a message-dialog?

The documentation says, under position, "Not Windows", and then there's this:
http://lists.wxwidgets.org/pipermail/wx-users/2002-July/022818.html

I've been using wxMessageDialogs in my development just to get
started, and later will think about going back and changing them to my
own message dialogs once more important things are worked out.

Che

···

On Tue, Jun 3, 2008 at 8:39 AM, Tim van der Leeuw <tnleeuw@gmail.com> wrote:

Hi,

I have a question about wx.MessageDialog.

It's constructor takes a 'pos' argument. I want to position the dialog near
the mouse, so I call the constructor with pos=wx.GetMousePosition().

However, the MessageDialog is always centered on the screen.

How can I put the (modal) message dialog at the place on the screen where I
want it to be?

Cheers,

--Tim

Hi Mike,

Andrea Gavana wrote:

Hi All,

Hi,

I have a question about wx.MessageDialog.

It's constructor takes a 'pos' argument. I want to position the dialog
near
the mouse, so I call the constructor with pos=wx.GetMousePosition().

However, the MessageDialog is always centered on the screen.

How can I put the (modal) message dialog at the place on the screen
where I
want it to be?

Cheers,

--Tim

The documentation says, under position, "Not Windows", and then there's
this:
http://lists.wxwidgets.org/pipermail/wx-users/2002-July/022818.html

I've been using wxMessageDialogs in my development just to get
started, and later will think about going back and changing them to my
own message dialogs once more important things are worked out.

This is exactly what I have done, I rolled my own implementation of a
"GenericMessageDialog" which works much better than the default one
:smiley:
I attach a couple of screenshots, is there is enough interest I will
release it on my website (and I accept criticism as well, for the
design and look and feel :smiley: ).

Andrea.

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

They look good to me. The only "issue" is that no program I've seen has ever
used a capital "O" and a lowercase "k" for the OK button. I don't know if
that's a standard, a "we've always done it that way and we're not changing"
or what, but that jumped out at me as being different.

No, this is just a mistake in my code, it's easy to correct :smiley:

I like the icons too. Are those standard or did you create them yourself?

I have used a mix of free (BSD or LGPL) icons I found on the net,
including Nuvola, Crystal Clear, Silk Icons and something else I can't
remember at the moment :smiley:

Andrea.

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

···

On Tue, Jun 3, 2008 at 4:06 PM, Mike Driscoll wrote:

On Tue, Jun 3, 2008 at 3:17 PM, C M wrote:

On Tue, Jun 3, 2008 at 8:39 AM, Tim van der Leeuw <tnleeuw@gmail.com> >>> wrote:

Hi Andrea,

if there is enough interest I will release it on my website

That would be great! I'm new to wxPython and appreciate the code you've
already posted to your site. Thank you!

and I accept criticism as well, for the design and look and feel

OK, you asked :slight_smile:

1. All dialogs: The wx.StaticLine's have different left/right margins in
each of your dialogs. Suggestion: consistent staticline margins across
dialogs.

2. All dialogs: Suggestion: Vertically center your bottom row of
button(s) in the space between the staticline and the bottom of the
frame. Your buttons currently have a larger margin between their bottom
edge and the bottom edge of the dialog than they do between the their
top edge and the bottom edge of the staticline above them.

3. Dialog 1: The left/right margins (for the text/icon) are too big.
Suggestion: consistent text/icon margins across dialogs.

4. Dialog 2: The shield icon displays poorly (look closely at its right
edge). Is this a problem with your image or your image presentation
code?

5. Enhancement: Support rich text messages.

6. Enhancement: Support position parameter to address the OP's original
question.

Thanks again for your contributions to the wxPython community!!

Regards,
Malcolm "picky"