|
|
Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » Range paste for GridCtrl
Range paste for GridCtrl [message #8539] |
Fri, 16 March 2007 16:26 |
nixnixnix
Messages: 415 Registered: February 2007 Location: Kelowna, British Columbia
|
Senior Member |
|
|
I can edit cells having added edit ctrls to each column. However, I can't select rectangular regions and more importantly, the paste only appears to work inside the edit control. When I try to paste a range of cells that I've copied from Excel, nothing happens.
Is there something I'm missing or is the paste function not implemented yet? Seems like if you could copy and paste from Excel then everything else is easy. If its not implemented I don't understand why the paste menu is there. Also, when I select two cells in a column the cells in the adjacent column get selected (I've turned off row select).
GridCtrl looks great and I realise its probably still under development.
Cheers,
Nick
|
|
|
Re: Range paste for GridCtrl [message #8550 is a reply to message #8539] |
Fri, 16 March 2007 21:40 |
|
nixnixnix wrote on Fri, 16 March 2007 11:26 | I can edit cells having added edit ctrls to each column. However, I can't select rectangular regions and more importantly, the paste only appears to work inside the edit control. When I try to paste a range of cells that I've copied from Excel, nothing happens.
|
Hold ctrl to make recatngural selection.
Pasting text and excel is unavailable now (lack of time..) but it will be implemented after releasing 2007.1. If you see at Paste routine you'll find //todo (add a proper code if you want there )
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], ' ');
//todo..
}
}
return;
}
Quote: |
If its not implemented I don't understand why the paste menu is there. Also, when I select two cells in a column the cells in the adjacent column get selected (I've turned off row select).
|
Something to fix. I will take a look ASAP.
Quote: |
GridCtrl looks great and I realise its probably still under development.
|
Yes, but in current form it should be quite stable and usable. I will write a better documentation soon to show you the all hidden power
PS: I have merging cells in 60% implemented - this will be next major future.
PS2: Thanks for reporting bugs!
|
|
|
|
|
|
|
Re: Range paste for GridCtrl [message #8573 is a reply to message #8570] |
Sun, 18 March 2007 22:01 |
|
unodgs wrote on Sun, 18 March 2007 11:55 | Thanks for the '\t'! Unfortunately I can't directly use your code as it must respect callbacks (WhenInsert/UpdateRow etc). But I'll try to add it before next release.
|
Ok. Added.
PS: Could you post any screenshots regarding adjacent cell selection problem. I can't reproduce it.. (what version do you use?)
|
|
|
|
Re: Range paste for GridCtrl [message #8601 is a reply to message #8598] |
Tue, 20 March 2007 20:01 |
|
Quote: | BTW, I've noticed that for pasting from tables in Adobe PDFs, the space is the correct separator (as you originally had it). Would it be possible for the new version to use both? So it would split rows based on newline and split cells based on space or tab?
|
Yes, but how to distinguish which one is correct - the only information I have is the text clipboard is available. Probably both adobe and excel store clipboard in native formats. I have to investigate.
As for the bug: how do you select the cells. Do you hold shift? or ctrl + mouse? the first one selects block like in the text editor the second makes rectangular selection (BTW: In my internal version it is possible to make rect. sels with ctrl and cursors). If you press ctrl and use mouse please put your code reffering to grid initialization (adding columns, setting properties) here.
|
|
|
Re: Range paste for GridCtrl [message #12466 is a reply to message #8601] |
Sun, 04 November 2007 04:33 |
nixnixnix
Messages: 415 Registered: February 2007 Location: Kelowna, British Columbia
|
Senior Member |
|
|
Thanks Daniel,
The ctrl + cursor works good (if a little non-standard) but when I go to cut and paste, only the last value out of my selection gets pasted to the new location and only one cell when I cut a whole column of 26 cells.
Is this by design? Is there a way to cut and paste multiple selections please?
Nick
[Updated on: Sun, 04 November 2007 04:34] Report message to a moderator
|
|
|
Re: Range paste for GridCtrl [message #12482 is a reply to message #12466] |
Mon, 05 November 2007 13:17 |
|
Hi!
Could you explain step by step what should I do to reproduce the incorrect behaviour. I don't exactely know what you mean. Right now I don't see any errors in copy & pasting.
|
|
|
|
|
|
|
|
|
|
Goto Forum:
Current Time: Fri Nov 01 00:34:51 CET 2024
Total time taken to generate the page: 0.02469 seconds
|
|
|