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 previous message
koldo is currently offline  koldo
Messages: 3129
Registered: August 2008
Ultimate Member
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
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to access Fixed Columns?
Next Topic: GridCtrl: repainting performance issue in dark mode on Win 10
Goto Forum:
  


Current Time: Sun Jun 07 01:14:06 CEST 2020

Total time taken to generate the page: 0.01716 seconds