Status area right under a toolbar.

I need a status area right under a toolbar to write various status
information related to the toolbar button actions. This is in an
MDIParentFrame. I tried adding a sizer and then a panel to the frame,
and this works, but the panel gets wiped out when any MDIChildFrames
are maximized. Is there a way to reposition the client area so my
panel does not get wiped out?

A co-worker had an older solution that just placed the buttons on the
toolbar using absolute positioning as if it were a canvas, but this
does not give you the visual hover/selected feedback that you get when
you use toolbar.AddLabelTool(). But perhaps there's a way to get this
behavior without writing all the event handling and creating separate
bitmaps for all the cases myself?

        self.toolBar1 = wx.ToolBar(id=wxID_MDIPARENTFRAMEMAINTOOLBAR1,
              name='toolBar1', parent=self, pos=wx.Point(0, 0),
              size=wx.Size(908, 60), style=wx.TB_HORIZONTAL |
wx.NO_BORDER)
        self.toolBar1.SetBackgroundColour(wx.Colour(128, 128, 128))
        self.toolBar1.SetToolBitmapSize(wx.Size(13, 48))
        self.SetToolBar(self.toolBar1)

        self.bitmapButtonAVGStart =
wx.BitmapButton(bitmap=wx.Bitmap(u'buttons/PNG/AVSTART0.png',
              wx.BITMAP_TYPE_PNG),
              id=wxID_MDIPARENTFRAMEMAINBITMAPBUTTONAVGSTART,
              name='bitmapButtonAVGStart', parent=self.toolBar1,
              pos=wx.Point(472, 3), size=wx.Size(32, 32),
style=wx.BU_AUTODRAW)

Thanks for any advice,
Dave Cook

Turns out it's not that bad, I just need to add a mask for the
background color of the buttons.

            bmp = wx.Bitmap(filename, wx.BITMAP_TYPE_PNG)
            mask = wx.Mask(bmp, wx.Color(192,192,192))
            bmp.SetMask(mask)

And this gives visual "focus/hover/selected" feedback even for those
buttons that I didn't have "selected" images for.

Dave Cook

···

On Sep 25, 7:30 am, Daverz <dav...@gmail.com> wrote:

A co-worker had an older solution that just placed the buttons on the
toolbar using absolute positioning as if it were a canvas, but this
does not give you the visual hover/selected feedback that you get when
you use toolbar.AddLabelTool(). But perhaps there's a way to get this
behavior without writing all the event handling and creating separate
bitmaps for all the cases myself?