Hello NG,
I am in the process of adding some features to ButtonPanel (as Robin has renamed FancyButtonPanel), which were on Robin's wish list. Basically they are:
1) Adding toggle support to the buttons (done);
2) Possibility to draw text below the bitmap buttons (done);
2) Using (when available) bitmaps for the "Normal", "Pressed", "Hover", "Toggled", "Disabled" state of a button (done);
3) Implementing programmer's defined "custom" states for a button with associated bitmap (almost done);
4) Moving the gradient drawing inside EVT_ERASE_BACKGRUND so as to give the programmer a way to override it (it seems impossible to me, EVT_ERASE_BACKGRUND does not allow me to do anything *except* calling "pass" when I use wx.BufferedPaintDC in the Paint. It works with wx.PaintDC but it flickers like mad);
5) Possibility to add stretchable spacers between buttons that allows you to align buttons almost in every way you wish (no idea on how to do it);
6) Adding support of wx.Control inside ButtonPanel (no idea on how to do it);
5 and 6 are particularly hostile to me because:
1) I can not use sizers (the buttons are not real controls, just images painted during Paint);
2) The combination of ButtonPanel text, possible stretchable spacers, controls and owner-drawn buttons is driving me crazy. I can't even start to think about a layout strategy, let's skip the actual coding :-(
3) The layout is complicated by the fact that if you shrink the ButtonPanel window, the buttons/controls that can not fit into it should be hidden/not drawn.
This is how ButtonPanel looks like right now (disabled bitmap, toggle functionality, text under bitmaps):
If someone has any suggestion about points 5 and 6, I would be glad to learn something new.
Thank you very much.
Andrea.
Andrea Gavana (gavana (AT) kpo (DOT) kz)
Reservoir Engineer
KPDL
4, Millbank
SW1P 3JA London
Direct Tel: +44 (0) 20 717 08936
Mobile Tel: +44 (0) 77 487 70534
Fax: +44 (0) 20 717 08900
Web: