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 » lostfocus
Re: lostfocus [message #6068 is a reply to message #6059] Sun, 29 October 2006 20:47 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Well, if you are about to overload ChildLostFocus, you do not have to change anything in Layout, just overload it for your dialog class:

struct MyDlg : MyLayout<TopWindow> {
   virtual void ChildLostFocus();
};


Anyway, the trouble of this method is that at the moment ChildLostFocus is called, focus is already out, so you have hard time to detect whether it is your editfield that lost the focus.

Therefore you will probably have to follow a little bit more complicated path and derive from EditField, overloading LostFocus method.

To have your new widget in Layout, just add it as user class. There is a little catch - class has to be defined when layout file is included. If for some reason you do not want that, you can still have it in the layout, just leave the name of class empty and add a public member to your dialog class with the same name as defined in layout, with proper class type.

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Right aligned EditField?
Next Topic: Bug "Self-invalidating time in EditTime"?
Goto Forum:
  


Current Time: Sun May 05 17:28:55 CEST 2024

Total time taken to generate the page: 0.02777 seconds