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 » U++ Widgets - General questions or Mixed problems » What way is best to implement Callback for GotFocus/LostFocus?
What way is best to implement Callback for GotFocus/LostFocus? [message #11006] Mon, 13 August 2007 22:48 Go to previous message
jlfranks is currently offline  jlfranks
Messages: 57
Registered: May 2007
Location: Houston, TX, USA
Member
We are solving the problem of editing a control in a touchschreen application.

For example, when EditString gets focus, we want to show a keyboard and be able to press buttons in order to modify the content of the control.

The first issue is generalizing the solution so that we can apply this to multiple EditString controls, or even EditDouble, EditInt.

One way is to derive from EditString and over-ride GotFocus() and LostFocus (), along with supporting API to set the callbacks for each.

A different approach is to hook the mouse event, check for the control of interest and with additional API and call the appropriate callbacks for various events/controls.

Which way is more desirable from a design viewpoint? Or, is there
another approach different from these?

--jlf
 
Read Message
Read Message
Previous Topic: "ScrollArea"...
Next Topic: Is there an equivalent of win32 API "SendMessage" in U++
Goto Forum:
  


Current Time: Sat May 11 15:35:09 CEST 2024

Total time taken to generate the page: 0.04093 seconds