On Mon, Aug 20, 2012 at 6:43 PM, Art Heimsoth <artst...@artheimsoth.com> wrote: > Is there an example showing how to do some processing when > an input field looses focus? I am especially interested in an Edit > input field loosing focus. Thanks
Here is a snippet of code: ::method initDialog expose staticText staticText = self~newStatic(IDC_ST_TYPE) self~connectEditEvent(IDC_EDIT, GOTFOCUS, "onFocus") self~connectEditEvent(IDC_EDIT, LOSTFOCUS, "onLostFocus") ::method onFocus unguarded expose staticText staticText~setText("The edit control now has the focus") return 0 ::method onLostFocus unguarded expose staticText staticText~setText("The edit control does not have the focus") return 0 In the above dialog, I change the text of a static control to show when the edit control gets the focus and when it losses the focus A couple of points. * You don't *have* to connect both the got focus and lose focus events if you are only interested in the lost focus. You can just connect the LOSTFOCUS event. * Technically, the program probably did not need to return 0 from the 2 event handlers. But, it is a good habit to always return a value from an event handler. I'll write an example and add it to the Extra ooDialog Examples package. What type of processing are you thinking of doing? -- Mark Miesfeld ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Oorexx-users mailing list Oorexx-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oorexx-users