Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » LineEdit, EditFields, DocEdit » Focus Event Handling in Edit Fields
icon5.gif  Focus Event Handling in Edit Fields [message #18888] Thu, 30 October 2008 15:36 Go to next message
bpacilio is currently offline  bpacilio
Messages: 1
Registered: October 2008
Junior Member
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,
Re: Focus Event Handling in Edit Fields [message #18938 is a reply to message #18888] Sat, 01 November 2008 23:32 Go to previous message
mirek is currently offline  mirek
Messages: 13442
Registered: November 2005
Ultimate Member
bpacilio wrote on Thu, 30 October 2008 10:36

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).

Mirek
Previous Topic: Added word wrap to LineEdit
Next Topic: EditField & K_ENTER example (?)
Goto Forum:
  


Current Time: Sat Oct 23 16:48:44 CEST 2021

Total time taken to generate the page: 0.00979 seconds