Sorry if this is an old question but I'm new to upp. I'm a unix/Motif programmer so I'm used to having a lot of control of the events in my gui. I'm just setting up a test app to see how the gui elements in upp work. I used the layout to set up a test window with a bunch of different elements. I wanted to set up an edit field that only does its' callback on a lostfocus event. I don't seem to be able to do this and the reference material is lacking. Doing the assignment editField <<= THISBACK(callback) only works when keyboard characters are typed.
Regards,
Sorry if this is an old question but I'm new to upp. I'm a unix/Motif programmer so I'm used to having a lot of control of the events in my gui. I'm just setting up a test app to see how the gui elements in upp work. I used the layout to set up a test window with a bunch of different elements. I wanted to set up an edit field that only does its' callback on a lostfocus event. I don't seem to be able to do this and the reference material is lacking. Doing the assignment editField <<= THISBACK(callback) only works when keyboard characters are typed.
Regards,
There are two ways:
- override LostFocus (e.g. make it call a new WhenLostFocus callback and then inherited EditField::LostFocus)
- handle focus issues in parent window using ChildLostFocus override.
"it's callback" is, my guess, WhenAction - that is inteded for "user changes the value of widget" situation (with one or two exceptions).