Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
But when I actually tried to use that in code, and with Bind and all that, no such luck. Also – what do I want to use as that ID? is that the idea of the Window it was raised from? or a unique id? (if I use wx.ID_ANY, I get -1 – is that a problem?
Yes, the ID should be an indicator of the object that the event is triggered from. For example, EVT_BUTTON uses the ID of the button widget. EVT_MENU uses the ID of the menu item, etc.
In most cases the ID is used implicitly when binding a handler. For example:
Will internally call someButton.GetId() to pass to the Connect method.
wx.ID_ANY in the binding is okay because it’s like a wildcard matching the event coming from any source object, but the ID assigned to the event object should not be wx.ID_ANY. That potentially could cause issues when processing the event.
···
On Friday, February 2, 2018 at 11:47:17 AM UTC-8, Chris Barker wrote:
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception