[wxPython-users] widget suggestion / question

Mark Erbaugh mark at microenh.com
Mon Dec 3 05:52:03 PST 2007


Zach,

On Mon, 2007-12-03 at 01:18 -0600, Zach Heilig wrote:
> > In Borland Delphi, the individual widgets (components) had a spare field
> > that could be used to store an integer for whatever purpose the
> > developer wanted.  I would like to see something like this in wx. Here's
> > where I could use something like this. I designed a form with a series
> > of buttons. Several of the buttons could share the same event handler if
> > the event handler could figure out which button invoked it.  I supposed
> > I could use reflection to figure out which button, but it would be nice
> > if the event handler could check this spare field in the button.
> >   
> You could do something like this (using a number keypad, as an example):    

Thanks for the example. I think it should work, but I was hoping to
avoid using the widget's label. It's possible that you might want to
change the label text (say for internationalization) without changing
the underlying code.

Thanks,
Mark






More information about the wxpython-users mailing list