Positionning a window regarding the display resolution

Hi,

How could I display my window so that it is alway at say 100 pixel from the
right of the screen.

The idea is creating a tooltip on a tray icon in the windows tray.
Mmmm.... maybe I could get the position of the tray icon... I'll see that...

By the way, I found an example on how to do some of this windows tray stuff
and in it there is a line like :

    self.trayIcon.PopupMenu (trayMenu)

where trayMenu is a wxMenu
and trayIcon is a wxTaskBarIcon

But how could I have found this by myself ?
I mean that a wxTaskBarIcon object as a PopupMenu method ???

Maybe there is a similar method to set my tooltip I have derived from a
wxMiniFrame ?

Thanks,
-philippe

Philippe Ney wrote:

Hi,

How could I display my window so that it is alway at say 100 pixel from the
right of the screen.

You probably want wxGetDisplaySize or wxGetClientDisplayRect

The idea is creating a tooltip on a tray icon in the windows tray.
Mmmm.... maybe I could get the position of the tray icon... I'll see that...

By the way, I found an example on how to do some of this windows tray stuff
and in it there is a line like :

    self.trayIcon.PopupMenu (trayMenu)

where trayMenu is a wxMenu
and trayIcon is a wxTaskBarIcon

But how could I have found this by myself ?
I mean that a wxTaskBarIcon object as a PopupMenu method ???

From the samples and/or source or the mail lists, and then enter a bug report about the missing documentation.

Maybe there is a similar method to set my tooltip I have derived from a
wxMiniFrame ?

Not for an arbitrary window like that, but if all you need to display is text then the second parameter to SetIcon will let you do it.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

> Hi,
>
> How could I display my window so that it is alway at say 100 pixel from
> the right of the screen.

You probably want wxGetDisplaySize or wxGetClientDisplayRect

Yes exactly what I need!
Thanks again...

> The idea is creating a tooltip on a tray icon in the windows tray.

[...]

> I mean that a wxTaskBarIcon object as a PopupMenu method ???

From the samples and/or source or the mail lists, and then enter a bug
report about the missing documentation.

I'll do it.

> Maybe there is a similar method to set my tooltip I have derived from a
> wxMiniFrame ?

Not for an arbitrary window like that, but if all you need to display is
text then the second parameter to SetIcon will let you do it.

I need more thant just a text tooltip as I want to get some EVT_LEFT_UP.
It's okay now thanks your information

Thanks Robin,
-philippe