![]() |
how to drag&drop in dialog class ? |
Post Reply ![]() |
Author | |
rolf ![]() Newbie ![]() Joined: 06 November 2006 Location: Germany Status: Offline Points: 3 |
![]() ![]() ![]() ![]() ![]() Posted: 06 November 2006 at 8:44am |
What do i have to do, if i want to use drag & drop in a CXTReportControl in a dialog derived class ?
In the sample ReportSample we have the dialog "Report Control"->"Control Test"->"Tree View Dialog" .... what do i have to modify, if i want to drag a row into an other position ... let's say drag row 4 by mouse (keeping left mouse button down) into position 2 (releasing left mouse button).
Doing that in the CXTPReportView derived class is very simple :
wndReport.EnableDragDrop(_T("ReportSampleView"), xtpReportAllowDrag | xtpReportAllowDrop);
But in the dialog class this does no work !
Anybody any idea how to make it ? |
|
![]() |
|
sserge ![]() Moderator Group ![]() Joined: 01 December 2004 Status: Offline Points: 1297 |
![]() ![]() ![]() ![]() ![]() |
Hi,
I've just checked it and it works fine. Add m_wndReport.EnableDragDrop(_T("TreeViewDlg"), xtpReportAllowDrop | xtpReportAllowDrag); somewhere in CTreeViewDlg::OnInitDialog() and try. NOTE: - Drag-drop movement does not move if rows sorted or groupped by some column. - You cannot move child items, only top level rows. -- WBR, Serge |
|
![]() |
|
rolf ![]() Newbie ![]() Joined: 06 November 2006 Location: Germany Status: Offline Points: 3 |
![]() ![]() ![]() ![]() ![]() |
Thank's for the answer, but this is still not working.
Example - ReportSample :
a) adding it in CReportSampleView::OnCreate() ... everythings fine ... it is working ... i can drag&drop ... having arrows on each side of the report and a small square near the mouse cursor
![]() b) adding it in CTreeViewDlg::OnInitDialog() ... will not work ... if i'm trying to drag&drop ... i have a small circle with a line :
Example - ReportDialog :
The source of CReportDialogDlg::OnInitDialog() allready contains this statement ... but (in my case) it is not working ... just the same as in CTreeViewDlg.
In both dialog - cases the rows are not sorted and not grouped. And i only tried to move top level rows.
I'm working with Toolkit Pro v10.20, compiler is MS VC 6.0, using static libs.
I'll be happy about any idea how to get a step further ...
Best regards, rolf |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |