[wxPython] StatusBar and Menue

If one add a Menue to a frame with a StatusBar the first field of the
StatusBar is cleared upon menue-activity. Pull-Down is sufficient for
this,
so I think there is no chance for refreshing.
Here a modified part of the respective demo.
Python2.0/wxPython2.3.0/MSW98

Thanks, Udo

class TestCustomStatusBar(wxFrame):
    def __init__(self, parent, log):
        wxFrame.__init__(self, parent, -1, 'Test Custom StatusBar',
                         wxPoint(0,0), wxSize(500, 300))
        wxWindow(self, -1).SetBackgroundColour(wxNamedColour("WHITE"))

        self.sb = CustomStatusBar(self, log)
        self.SetStatusBar(self.sb)
        EVT_CLOSE(self, self.OnCloseWindow)

        #here comes the add-on
        self.mn= wxMenu()
        self.mn.Append(wxNewId(), 'x')
        self.menue= wxMenuBar()
      self.menue.Append(self.mn, 'X')
        self.SetMenuBar( self.menue )

    def OnCloseWindow(self, event):
        self.sb.timer.Stop()
        del self.sb.timer
        self.Destroy()

If one add a Menue to a frame with a StatusBar the first field of the
StatusBar is cleared upon menue-activity. Pull-Down is sufficient for
this,
so I think there is no chance for refreshing.
Here a modified part of the respective demo.
Python2.0/wxPython2.3.0/MSW98

The default event handler for EVT_MENU_HIGHLIGHT will take the helpString
for the menu item about to be highlighted and puts it in the frame's
statusbar if it has one. If you want to change this behaviour you should be
able to do so by providing your own event handler for EVT_MENU_HIGHLIGHT.

···

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

Robin Dunn wrote:

The default event handler for EVT_MENU_HIGHLIGHT will take the helpString
for the menu item about to be highlighted and puts it in the frame's
statusbar if it has one. If you want to change this behaviour you should be
able to do so by providing your own event handler for EVT_MENU_HIGHLIGHT.

No success because EVT_MENU_HIGHLIGHT (in the doc. 'yet not available'
but it's there)
is for individually menu-items, but the status field is already changed
by pulling down the menu, the related event is yet not existing(it seems
so (2.3.0)).

Thanks, Udo

No success because EVT_MENU_HIGHLIGHT (in the doc. 'yet not available'
but it's there)
is for individually menu-items, but the status field is already changed
by pulling down the menu, the related event is yet not existing(it seems
so (2.3.0)).

You could always use a timer or idle event handler to put your desired text
back into the status bar.

···

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