Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - how to drag&drop in dialog class ?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

how to drag&drop in dialog class ?

 Post Reply Post Reply
Author
Message
rolf View Drop Down
Newbie
Newbie


Joined: 06 November 2006
Location: Germany
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote rolf Quote  Post ReplyReply Direct Link To This Post Topic: how to drag&drop in dialog class ?
    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 ?
Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
rolf View Drop Down
Newbie
Newbie


Joined: 06 November 2006
Location: Germany
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote rolf Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.187 seconds.