'name' argument for widgets

Dietmar Schwertberger <[email protected]> Sun, 17 May 2026 00:06:41 +0200
Newsgroups gmane.comp.python.wxglade
Message-ID <[email protected]>
Hi!

Recently I thought about adding the 'name' argument to all widgets.

E.g.
self.sp_mask_h = wx.SpinButton(self.acquisition_panel, wx.ID_ANY , 
style=wx.SP_ARROW_KEYS | wx.SP_HORIZONTAL, name="sp_mask_h")
instead of
self.sp_mask_h = wx.SpinButton(self.acquisition_panel, wx.ID_ANY , 
style=wx.SP_ARROW_KEYS | wx.SP_HORIZONTAL)

This would e.g. allow an event handler to retrieve the source of the 
event more easily: event.EventObject.Name

What do you think?
Would it be OK to add the argument unconditionally? Should there be an 
option per project or a global preference option?


Regards,

Dietmar