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 » GridCtrl empty cells pasted from Excel
GridCtrl empty cells pasted from Excel [message #17362] Sat, 09 August 2008 01:11 Go to previous message
koldo is currently offline  koldo
Messages: 3362
Registered: August 2008
Senior Veteran
Hello all

First of all thanks to Ultimate++ developers because this is something I wait many time ago. It is simple, original and powerful!

Second the question: I found that when pasting a row on a GridCtrl copied from excel or notepad the empty cells are simply not copied.

For example:

Copied from Excel: Hello/(empty)/World
Pasted in GridCtrl: Hello/World/(empty)

However if this is copied from GridCtrl its is pasted to perfectly.

Surfing through the code I have found that in GridCtrl.cpp, function void GridCtrl::Paste(int mode), line 791, on

...
for(int i = 0; i < lines.GetCount(); i++)
{
Vector<String> cells = Upp::Split(lines[i], '\t');
for(int j = 0; j < cells.GetCount(); j++)
...

If I put Upp::Split(lines[i], '\t', false); instead, the row is copied Ok including empty cells.

Another comment: When copying to the clipboard from GridCtrl it seems is included a empty cell at the end (an extra '\t' character).

Best regards






Best regards
IƱaki
 
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: adding row from another window and updating GUI
Next Topic: Unicode character paste in GridCtrl
Goto Forum:
  


Current Time: Tue May 21 17:50:06 CEST 2024

Total time taken to generate the page: 0.01254 seconds