The general rule with GUIs is to bind at the lowest practical level, usually 
the widget itself.
The exception is usually for things like global accelerators. For example 
launching a 
help browser might be at window level.
 
Alan Gauld
Author of the Learn To Program website
http://www.alan-g.me.uk/



>________________________________
> From: "Prasad, Ramit" <ramit.pra...@jpmorgan.com>
>To: Alan Gauld <alan.ga...@btinternet.com>; "tutor@python.org" 
><tutor@python.org> 
>Sent: Thursday, 8 December 2011, 19:07
>Subject: RE: [Tutor] how to link GUI app to the code
> 
>>self.Bind(wx.EVT_BUTTON, self.OnSubmit, self.button_submit)
>
>How do you decide when it is appropriate to bind to a panel/frame and when to 
>bind to the widget itself? I understand that certain events do not propagate 
>up the widget stack, but what about for events that do? Is there a guideline 
>of which is appropriate when?
>
>Ramit
>
>P.S. Yes, I should probably ask the wxPython mailing list...but I don't care 
>enough (yet) to subscribe to a new list. :)
>
>
>Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology
>712 Main Street | Houston, TX 77002
>work phone: 713 - 216 - 5423
>
>--
>
>This email is confidential and subject to important disclaimers and
>conditions including on offers for the purchase or sale of
>securities, accuracy and completeness of information, viruses,
>confidentiality, legal privilege, and legal entity disclaimers,
>available at http://www.jpmorgan.com/pages/disclosures/email.
>
>
>
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to