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 » ArrayCtrl, HeaderCtrl & GridCtrl » ArrayCtrl::SetClipboard does not set \r\n in rows
ArrayCtrl::SetClipboard does not set \r\n in rows [message #53135] Fri, 06 March 2020 14:17 Go to next message
koldo is currently offline  koldo
Messages: 3356
Registered: August 2008
Senior Veteran
String ArrayCtrl::AsText(String (*format)(const Value&), bool sel,
                         const char *tab, const char *row,
                         const char *hdrtab, const char *hdrrow) const
{
	String txt;
	if(hdrtab) {
		for(int i = 0; i < GetColumnCount(); i++) {
			if(i)
				txt << hdrtab;
			txt << (*format)(HeaderTab(i).GetText());
		}
		if(hdrrow)
			txt << hdrrow;
	}
	bool next = false;
	for(int r = 0; r < GetCount(); r++)
		if(!sel || IsSel(r)) {
			if(!next)
				txt << row;  // \r\n is just included for the first row
			for(int i = 0; i < GetColumnCount(); i++) {
				if(i)
					txt << tab;
				txt << (*format)(GetConvertedColumn(r, i));
			}
			next = true;
		}
	return txt;
}


Best regards
Iñaki
Re: ArrayCtrl::SetClipboard does not set \r\n in rows [message #53148 is a reply to message #53135] Mon, 09 March 2020 10:20 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3356
Registered: August 2008
Senior Veteran
My users are already complaining. I have changed my local copy.

Best regards
Iñaki
Re: ArrayCtrl::SetClipboard does not set \r\n in rows [message #53159 is a reply to message #53148] Mon, 09 March 2020 19:13 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
I am sorry, that was stupid. Fixed in trunk.
Re: ArrayCtrl::SetClipboard does not set \r\n in rows [message #53160 is a reply to message #53159] Tue, 10 March 2020 07:56 Go to previous message
koldo is currently offline  koldo
Messages: 3356
Registered: August 2008
Senior Veteran
Thank you! Smile

Best regards
Iñaki
Previous Topic: How to access Fixed Columns?
Next Topic: GridCtrl: repainting performance issue in dark mode on Win 10
Goto Forum:
  


Current Time: Thu Apr 18 08:41:17 CEST 2024

Total time taken to generate the page: 0.02682 seconds