Print Page | Close Window

how to drag&drop in dialog class ?

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=5439
Printed Date: 13 May 2024 at 10:29pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: how to drag&drop in dialog class ?
Posted By: rolf
Subject: how to drag&drop in dialog class ?
Date 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 ?



Replies:
Posted By: sserge
Date Posted: 06 November 2006 at 1:58pm
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


Posted By: rolf
Date Posted: 07 November 2006 at 1:51am
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



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net