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 » Range paste for GridCtrl
Re: Range paste for GridCtrl [message #8551 is a reply to message #8550] Fri, 16 March 2007 22:42 Go to previous messageGo to previous message
nixnixnix is currently offline  nixnixnix
Messages: 415
Registered: February 2007
Location: Kelowna, British Columbia
Senior Member
Thanks, yes I see it now.

Am tempted to have a go at writing something myself just now as I can see the values from my excel copy coming through loud and clear Very Happy

Perhaps if I get it working the way I want, I'll post it here s you have the option of tidying it up and including it in a future release

BTW (sliding off topic) as there is no TRACE in UPP, I am currently debugging with PromptOK(). Is the something better?

anyway inserting the code below and pasting 2x2 cells from excel makes it pretty obvious what is going on


GridClipboard gc = GetClipboard();
if(gc.data.IsEmpty())
{
if(IsClipboardAvailableText())
{
Vector<String> lines = Upp::Split(ReadClipboardText(), '\n');
for(int i = 0; i < lines.GetCount(); i++)
{
Vector<String> cells = Upp::Split(lines[i], '\t'); // tab not space
//todo..
//################################## my code - remove later
PromptOK("new line");
for(int j=0;j<cells.GetCount();j++)
{
String s = Format("##%s##",cells[j]);
PromptOK(s);
}
//##################################
}
}
return;
}



I will continue and get it the way I want it then post and you can see if you think its worth including.

Cheers for setting me on the path Smile

Nick

[Updated on: Fri, 16 March 2007 22:44]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to change GridCtrl background color
Next Topic: How to do column resizing after ShowColumn() or HideColumn()?
Goto Forum:
  


Current Time: Sun May 12 19:49:40 CEST 2024

Total time taken to generate the page: 0.01767 seconds