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++ Library : Other (not classified elsewhere) » Append line into LineEdit or DocEdit
Re: Append line into LineEdit or DocEdit [message #47082 is a reply to message #47080] Tue, 29 November 2016 21:50 Go to previous messageGo to previous message
Zbych is currently offline  Zbych
Messages: 325
Registered: July 2009
Senior Member
I usually use LineEdit and this code from TheIDE to implement log window:
void XXX::Log(const String& txt)
{
	int l, h;

	log.GetSelection(l, h);
	log.SetEditable();
	log.MoveTextEnd();
	Vector<String> v = Split(txt, '\n');
	auto t = GetSysTime();
	for (int i = 0; i < v.GetCount(); i++){
		log.Paste(WString(Format("\n%02d:%02d:%02d: %s", t.hour, t.minute, t.second, v[i])));
	}
	log.SetReadOnly();
	log.SetSelection(l, h);
	log.ScrollEnd();
}

[Updated on: Tue, 29 November 2016 21:52]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Convert Upp::String to int
Next Topic: Problem with dialogs
Goto Forum:
  


Current Time: Sat Apr 27 11:52:03 CEST 2024

Total time taken to generate the page: 0.03389 seconds