[wxPython] Position of a pop up menu

From a previous posting I've used this code:

popup = self.list_script.PopupMenu(self.menu,event.GetPosition())

to successfully pop up a menu.

However the point the menu pops up next to the point you clicked with the
mouse, is half way down the height of the menu, and where the list is close
to the bottom of the screen, the menu extends all the way to the bottom of
the screen (literally - actually overlaps the task bar as well).

Is there any way to get it to pop up from the point of the cursor upwards, so
that the cursor point is actually the bottom left position?

Thanks in anticipation.

Dr Richard Terry
gui co-ordinator
gnumed project.

However the point the menu pops up next to the point you clicked with the
mouse, is half way down the height of the menu, and where the list is

close

to the bottom of the screen, the menu extends all the way to the bottom of
the screen (literally - actually overlaps the task bar as well).

Is there any way to get it to pop up from the point of the cursor upwards,

so

that the cursor point is actually the bottom left position?

It should be handled automatically by the underlying platform, if it thinks
it is necessary.

···

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

I noticed that Robin, ie it doesn't let it go below the bottom of the actually
screen, however it would look much neater, given the knowlege of the
programmer (me!!!! - hey I'm learning little by little - very slow though!!),
that because of the number of items on the menu, it will visually be more in
line with the users eyes if popped up higher on the screen. So I wanted to be
able to know the exact xy cursor point and have the bottom of the menu not go
past that. Any solution?

Regards, and thanks for replying as usual.

Richard Terry
gui-cordinator
gnumed project

···

On Wednesday 07 August 2002 3:26 am, Robin Dunn wrote:

> However the point the menu pops up next to the point you clicked with the
> mouse, is half way down the height of the menu, and where the list is

close

> to the bottom of the screen, the menu extends all the way to the bottom
> of the screen (literally - actually overlaps the task bar as well).
>
> Is there any way to get it to pop up from the point of the cursor
> upwards,

so

> that the cursor point is actually the bottom left position?

It should be handled automatically by the underlying platform, if it thinks
it is necessary.

I noticed that Robin, ie it doesn't let it go below the bottom of
the actually screen, however it would look much neater, given the
knowlege of the programmer (me!!!! - hey I'm learning little by
little - very slow though!!), that because of the number of items on
the menu, it will visually be more in line with the users eyes if
popped up higher on the screen. So I wanted to be able to know the
exact xy cursor point and have the bottom of the menu not go past
that. Any solution?

Not that I know of.

···

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