Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » Problem with Drag&Drop in ArrayCtrl
Re: Problem with Drag&Drop in ArrayCtrl [message #22556 is a reply to message #22552] |
Sun, 26 July 2009 23:50   |
 |
koldo
Messages: 3437 Registered: August 2008
|
Senior Veteran |
|
|
luzr wrote on Sun, 26 July 2009 17:28 |
koldo wrote on Sat, 18 July 2009 07:51 | More simple:
Is it possible to update/refresh only one row in an ArrayCtrl ?
Best regards
Koldo
|
void ArrayCtrl::RefreshRow(int i);
|
Hello Mirek
Unfortunately RefreshRow() does not repaint the row.
To force the repaint I have to scroll up and down and then I see the row repainted.
Using instead UpdateRefresh() repaints the rows properly, but it seems it cancels the Drag & Drop possibility.
It is difficult to prepare a sample case as the application is rather big. Here I put some details:
The variable is declared under the TopWindow class as
The layout is in:
filesList.AddColumn("Thumbnail").SetDisplay(Single<DisplayThumbnail>()).HeaderTab().Min(50);
filesList.AddColumn("Properties").HeaderTab().Min(50);
filesList.MultiSelect().HeaderObject().Absolute().Clipboard();
filesList.HeaderTab(0).SetRatio(10);
filesList.ColumnWidths("100 100");
filesList.WhenDropInsert = THISBACK(DropInsertFilelist);
filesList.WhenDrag = THISBACK(DragFilelist);
filesList.WhenDrop = THISBACK(DropFilelist);
DisplayThumbnail declaration:
struct DisplayThumbnail : public Display {
virtual void Paint(Draw& w, const Rect& r, const Value& val, Color ink, Color paper, dword style) const;
};
And Drag & Drop functions
void DropFilelist(PasteClip& d)
{
if(AcceptText(d)) {
filesList.Add(GetString(d), GetString(d));
filesList.SetFocus();
}
}
void DropInsertFilelist(int line, PasteClip& d)
{
if(AcceptInternal<ArrayCtrl>(d, "array")) {
filesList.InsertDrop(line, d);
filesList.SetFocus();
filesList.SetLineCy(70);
}
}
void DragFilelist()
{
filesList.DoDragAndDrop(InternalClip(filesList, "array"));
}
Best regards
Koldo
Best regards
IƱaki
|
|
|
 |
|
Problem with Drag&Drop in ArrayCtrl
By: koldo on Wed, 15 July 2009 18:02
|
 |
|
Re: Problem with Drag&Drop in ArrayCtrl
By: koldo on Sat, 18 July 2009 13:51
|
 |
|
Re: Problem with Drag&Drop in ArrayCtrl
By: mirek on Sun, 26 July 2009 17:28
|
 |
|
Re: Problem with Drag&Drop in ArrayCtrl
By: koldo on Sun, 26 July 2009 23:50
|
 |
|
Re: Problem with Drag&Drop in ArrayCtrl
By: mirek on Mon, 27 July 2009 03:19
|
 |
|
Re: Problem with Drag&Drop in ArrayCtrl
By: koldo on Mon, 27 July 2009 09:03
|
 |
|
Re: Problem with Drag&Drop in ArrayCtrl
By: mirek on Mon, 27 July 2009 17:20
|
 |
|
Re: Problem with Drag&Drop in ArrayCtrl
By: koldo on Tue, 28 July 2009 00:15
|
 |
|
Re: Problem with Drag&Drop in ArrayCtrl
By: mirek on Tue, 28 July 2009 03:06
|
 |
|
Re: Problem with Drag&Drop in ArrayCtrl
By: koldo on Tue, 28 July 2009 09:49
|
 |
|
Re: Problem with Drag&Drop in ArrayCtrl
By: mrjt on Tue, 28 July 2009 13:59
|
 |
|
Re: Problem with Drag&Drop in ArrayCtrl
By: mrjt on Tue, 28 July 2009 14:24
|
 |
|
Re: Problem with Drag&Drop in ArrayCtrl
By: koldo on Tue, 28 July 2009 16:24
|
 |
|
Re: Problem with Drag&Drop in ArrayCtrl
By: mrjt on Tue, 28 July 2009 17:08
|
 |
|
Re: Problem with Drag&Drop in ArrayCtrl
By: koldo on Tue, 28 July 2009 22:56
|
 |
|
Re: Problem with Drag&Drop in ArrayCtrl
By: mirek on Wed, 29 July 2009 05:48
|
 |
|
Re: Problem with Drag&Drop in ArrayCtrl
By: koldo on Wed, 29 July 2009 08:34
|
 |
|
Re: Problem with Drag&Drop in ArrayCtrl
By: mirek on Wed, 29 July 2009 08:45
|
 |
|
Re: Problem with Drag&Drop in ArrayCtrl
By: koldo on Wed, 29 July 2009 13:16
|
 |
|
Re: Problem with Drag&Drop in ArrayCtrl
By: mirek on Fri, 31 July 2009 19:04
|
 |
|
Re: Problem with Drag&Drop in ArrayCtrl
By: koldo on Thu, 13 August 2009 13:42
|
 |
|
Re: Problem with Drag&Drop in ArrayCtrl [SOLVED]
By: koldo on Wed, 26 August 2009 09:17
|
 |
|
Re: Problem with Drag&Drop in ArrayCtrl
By: mirek on Sun, 26 July 2009 17:28
|
Goto Forum:
Current Time: Fri Jul 18 07:35:00 CEST 2025
Total time taken to generate the page: 0.03486 seconds
|