Ticket #3897 (closed defect: fixed)
wxMenu with images doesn't update
| Reported by: | hzd_byte | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | wxMSW | Version: | 2.9.4 |
| Keywords: | onmeasureitem, menu, width, update | Cc: | hzd_byte, p_michalczyk, vadz, dhyams |
| Blocked By: | Patch: | yes | |
| Blocking: |
Description
I created menu with:
wxMenuBar *menuBar = new wxMenuBar;
m_fileMenu = new wxMenu;
wxMenuItem *fileOpenItem = new wxMenuItem(m_fileMenu, ID_OPENGAME, wxT("-"));
fileOpenItem->SetBitmap(wxBitmap(open_xpm));
m_fileMenu->Append(fileOpenItem);
...
menuBar->Append(m_fileMenu, wxT(""));
SetMenuBar(menuBar);
such items (with images).
Then I changed labels with:
menuBar->SetLabel(ID_OPENGAME, _("New text!"));
and menu didn't change it's width!
I tried use of
menuBar->Refresh();
and
m_fileMenu->UpdateUI();
but result remains the same :(
When I use menu without images there is all ok and menu changes it's width.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

