U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » CalendarCtrl » switch date format
Re: switch date format [message #24257 is a reply to message #24246] Thu, 07 January 2010 17:48 Go to previous messageGo to previous message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
The problem is caused by the EditField, namely this bit of code:
void EditField::GotFocus()
{
	if(autoformat && IsEditable() && !IsNull(text) && inactive_convert) {
		Value v = convert->Scan(text);
		if(!v.IsError()) {
			WString s = convert->Format(v);
			if(s != text) text = s;
		}
	}
	if(!keep_selection) {
		anchor = 0;
		cursor = text.GetLength();
	}
	Finish();
	SyncEdge();
}


So disabling AutoFormat of the ctrl fixes it.
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Min and Max in DropTime
Next Topic: StrToDate(Date& d, const char *s, Date def)
Goto Forum:
  


Current Time: Tue Jun 30 01:56:04 GMT+2 2026

Total time taken to generate the page: 0.00534 seconds