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 » [FEATURE] WhenLostFocus in EditField
Re: [FEATURE] WhenLostFocus in EditField [message #31143 is a reply to message #31141] Wed, 09 February 2011 18:09 Go to previous messageGo to previous message
koldo is currently offline  koldo
Messages: 3358
Registered: August 2008
Senior Veteran
Hello Honza

dolik.rce wrote on Wed, 09 February 2011 14:07

Usc supports templates, so you don't have to lose anything Wink Example can be found in CtrlLib.usc, look for WithDropChoice.

You can also create your new .usc with things like this:

ctrl MyEditStringLostFocus {
	>EditString;
}
ctrl MyEditIntLostFocus {
	>EditInt;
}
ctrl MyEditDoubleLostFocus {
	>EditDouble;
}
...

However this overcrowd layout menu unnecessarily with controls that are almost clone.

dolik.rce wrote on Wed, 09 February 2011 14:07

Anyway, I agree that it is unnecessary in this case and that it is much more elegant to use WhenEnter and ChildLostFocus (which is great idea which never occured to me before Mirek mentioned it Smile ).

Well, I agree. However it is possible that somebody would prefer something more detailed for a higher modularization degree. In addition, remember that specially when it is computationally expensive to check the values of all fields, with ChildLostFocus you do not know which field has lost the focus.


Best regards
IƱaki
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: New Select form in DocEdit or LineEdit
Next Topic: TextCtrl (aka LineEdit,DocEdit) dont use global Style
Goto Forum:
  


Current Time: Mon Apr 29 18:48:42 CEST 2024

Total time taken to generate the page: 0.02793 seconds