I had already tried that. Is there any way to get the object's name, as I
asked? I printed the output from an 'OK' button clicked:
What do you mean by "the object's name"? If you mean the name of a variable
that references the object, then no, you can't. (The long answer is that
you prbably can with efforts in limited cases, but it's a really bad idea.)
<wxPython.controls.wxButton instance; proxy of C++ wxButton instance at
_845f020_wxButton_p>
Can't you use a method of this object to see if it was the OK button?
Something like: event.GetEventObject().GetLabel() perhaps?
I had already tried that. Is there any way to get the object's name, as I
asked? I printed the output from an 'OK' button clicked:
What do you mean by "the object's name"? If you mean the name of a variable
that references the object, then no, you can't. (The long answer is that
you prbably can with efforts in limited cases, but it's a really bad idea.)
<wxPython.controls.wxButton instance; proxy of C++ wxButton instance at
_845f020_wxButton_p>
Can't you use a method of this object to see if it was the OK button? Something like: event.GetEventObject().GetLabel() perhaps?
Or:
if event.GetId() == self.self.choiceCodGrupo.GetId():
...
or even:
if event.GetEventObject() is self.choiceCodGrupo:
...
···
On Ter 04 Mai 2004 02:54, Peter Damoc wrote:
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!