wxGrid and adding a wxButton as a cell
Robin Dunn
robin at alldunn.com
Thu May 3 11:37:50 PDT 2007
Vadim Zeitlin wrote:
> On Thu, 3 May 2007 20:02:08 +0200 Volker Bartheld <dr_versaeg at freenet.de> wrote:
>
> VB> I know it sounds ridiculous, but: Is it possible to have a wxButton as a
> VB> wxGrid's cell, i. e. something like
> VB> class wxGridButtonCellRenderer : public wxGridCellRenderer {}
> VB> that shows a wxButton in wxGridButtonCellRenderer::Draw() and forwards
> VB> button events to the wxGrid parent? *)
>
> This is not currently possible as we don't have any way to draw a button
> (there is no such method in wxRenderer). But in principle it could be
> done...
We've got DrawPushButton. It handles drawing the background and border
of the button using the appropriate themes, but doesn't draw the label.
That's easy enough to do yourself though.
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!
More information about the wx-users
mailing list