Popup menu with bitmaps has inconsistent alignment

Hi,

I've just found an inconsistency in the alignment of popup menus which
has bitmap items. Platform MSW, wxPython 2.6.0.0

This can be demostrated with the demo. Load the demo, first right click
gets the result of popupmenu1.jpg, while second right click gets
popupmenu2

It might be some calculation to align items when there are any bitmap
items, but this calculation seems to have been done too "lazily". It
might needs to be done everytime the menu has items added or removed.
(I have not checked the code. )

Thanks.

Best regards.

ZhangYue张岳
zhangyue99@tsinghua.org.cn
2005-05-31

popupmenu1.jpg

popupmenu2.jpg

This can be demostrated with the demo. Load the demo, first right click
gets the result of popupmenu1.jpg, while second right click gets
popupmenu2

This is when running the "Core Windows/Controls", "PopupMenu" demo. Seen
in 2.6.0.0.

Hugh

ZhangYue张岳 wrote:

Hi,

I've just found an inconsistency in the alignment of popup menus which
has bitmap items. Platform MSW, wxPython 2.6.0.0

This can be demostrated with the demo. Load the demo, first right click
gets the result of popupmenu1.jpg, while second right click gets
popupmenu2

It might be some calculation to align items when there are any bitmap
items, but this calculation seems to have been done too "lazily". It
might needs to be done everytime the menu has items added or removed.
(I have not checked the code. )

Thanks for creating a bug report about this.

···

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