Home » U++ Library support » LineEdit, EditFields, DocEdit » Lost focus in edit fields
Re: Lost focus in edit fields [message #22620 is a reply to message #22615] |
Sat, 01 August 2009 11:41   |
Zbych
Messages: 327 Registered: July 2009
|
Senior Member |
|
|
Didier wrote on Sat, 01 August 2009 10:43 | It adds a callback to the type <T> and does what you want while avoiding modifying upp src.
|
I don't really mind modyfing upp src , esspecially when it is just two lines (one in *.cpp and one in *.h):
EditField.cpp :
void EditField::LostFocus()
{
if(autoformat && IsEditable() && !IsNull(text)) {
Value v = convert->Scan(text);
if(!v.IsError()) {
const Convert * cv = inactive_convert ? inactive_convert : convert;
WString s = cv->Format(v);
if(s != text) text = s;
}
}
if(!keep_selection) {
anchor = -1;
cursor = sc = 0;
WhenLostFocus();//<--here
}
Refresh();
SyncEdge();
}
[Updated on: Sat, 01 August 2009 11:42] Report message to a moderator
|
|
|
 |
|
Lost focus in edit fields
By: Zbych on Thu, 30 July 2009 10:17
|
 |
|
Re: Lost focus in edit fields
By: mirek on Sat, 01 August 2009 08:56
|
 |
|
Re: Lost focus in edit fields
By: Didier on Sat, 01 August 2009 10:43
|
 |
|
Re: Lost focus in edit fields
By: mirek on Sat, 01 August 2009 11:16
|
 |
|
Re: Lost focus in edit fields
By: Zbych on Sat, 01 August 2009 11:41
|
 |
|
Re: Lost focus in edit fields
By: Didier on Sat, 01 August 2009 12:25
|
 |
|
Re: Lost focus in edit fields
By: mirek on Sat, 01 August 2009 14:30
|
 |
|
Re: Lost focus in edit fields
By: Didier on Sat, 01 August 2009 16:23
|
 |
|
Re: Lost focus in edit fields
By: mirek on Sat, 01 August 2009 14:28
|
 |
|
Re: Lost focus in edit fields
By: Giorgio on Thu, 27 August 2015 09:05
|
 |
|
Re: Lost focus in edit fields
|
 |
|
Re: Lost focus in edit fields
By: mrjt on Thu, 29 July 2010 12:57
|
 |
|
Re: Lost focus in edit fields
|
Goto Forum:
Current Time: Fri Jul 18 06:39:58 CEST 2025
Total time taken to generate the page: 0.04009 seconds
|