StatusBar Text Disappears When Hover Over Toolbar Buttons

Hello, all! I'm having an issue where the text in a status bar is
disappearing when I hover over a toolbar button. Here are some
snippets of my code:

···

---------------------------------------
#Toolbar Creation
def MainToolbar( parent ):
    parent.SetMargins( [2,2] )

    parent.AddLabelTool( tbBrowse, "Browse", MyBitmapsFunc( 0 ),
wx.NullBitmap, wx.ITEM_NORMAL, "Browse for directory" )
    parent.AddLabelTool( tbRename, "Rename", MyBitmapsFunc( 1 ),
wx.NullBitmap, wx.ITEM_NORMAL, "Rename selected files" )

    parent.Realize()

def MyBitmapsFunc( index ):
    if index == 0:
        return wx.Image( "MyBitmapsFunc_0.png",
wx.BITMAP_TYPE_PNG ).ConvertToBitmap()
    if index == 1:
        return wx.Image( "MyBitmapsFunc_1.png",
wx.BITMAP_TYPE_PNG ).ConvertToBitmap()
    return wx.NullBitmap
------------------------------------------

#Toolbar Implementation
tb = self.CreateToolBar(wx.TB_HORIZONTAL|wx.NO_BORDER)
MainToolbar(tb)

------------------------------------------

I don't understand why this is happening; I don't have any event
handlers for a toolbar button 'MouseOver' event that would cause this
behavior...

Because the toolbar is displaying each tool's long-help text in the statusbar, and then clearing it when the cursor leaves the tool. (At least that is how it is supposed to work.)

You can work around this in a couple ways. You can probably disable it by catching the EVT_TOOL_ENTER event and *not* calling Skip in the handler. Or you can let it show the help and then put back whatever you had there before using a timer (the demo shows this but just sets the status text to ""). It seems like there is also a way to tell it to show the text in a different field of the status bar, but I'm not seeing it now so maybe it is only menu items or is a 2.9 feature or something.

If it seems like you are seeing something different than what I am describing then please make a runnable, small as possible, sample application that demonstrates the problem and let us know the platform and wx version. MakingSampleApps - wxPyWiki

···

On 4/11/11 12:32 PM, Bryan Green wrote:

Hello, all! I'm having an issue where the text in a status bar is
disappearing when I hover over a toolbar button. Here are some
snippets of my code:

I don't understand why this is happening; I don't have any event
handlers for a toolbar button 'MouseOver' event that would cause this
behavior...

--
Robin Dunn
Software Craftsman