Print Page | Close Window

TaskPanel: New Drag/Drop Modes

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Suite Pro
Forum Description: Topics Related to Codejock Suite Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=1926
Printed Date: 10 May 2025 at 3:58am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: TaskPanel: New Drag/Drop Modes
Posted By: Boyd
Subject: TaskPanel: New Drag/Drop Modes
Date Posted: 07 March 2005 at 1:20pm

I'm trying to work out the new AllowDrag modes for TaskPanel in 9.60.1.  My goal is to allow the user to copy/move items within the control by dragging, but I only want them to be able to copy the item if it's dragged outside the control.  In other words, I want to allow all Drag/Drop operations EXCEPT move outside the control.

How do I combine xtpTaskItemAllowDragCopy and xtpTaskItemAllowDragMoveWithinControl?

I'm using C# .NET 2003 with the following code:

toolbox.AllowDrag = XTPTaskPanelItemAllowDrag.xtpTaskItemAllowDragCopy |  XTPTaskPanelItemAllowDrag.xtpTaskItemAllowDragMoveWithinCont rol;

When I set this code, I have full move/copy support both inside and outside the control, when I should only be able to copy outside the control.




Replies:
Posted By: SuperMario
Date Posted: 07 March 2005 at 1:31pm
**I updated this with correct syntax**
Maybe try:
wndToolBox.AllowDrag = xtpTaskItemAllowDragCopyOutsideControl Or xtpTaskItemAllowDragWithinControl


Posted By: Boyd
Date Posted: 07 March 2005 at 1:45pm
Thanks, but that's invalid syntax for C#.  You represent "Or" in C# by using the "|" character shown in my original example.  Same as C++.  This is what I was already trying.


Posted By: SuperMario
Date Posted: 07 March 2005 at 3:07pm
This code works in C++:

m_wndTaskPanel.AllowDrag(xtpTaskItemAllowDragCopyOutsideCo ntrol|xtpTaskItemAllowDragWithinControl);

I don't have a C# sample of the Toolbox to test, and don't have time to write one to check this code out.


Posted By: Boyd
Date Posted: 07 March 2005 at 3:24pm

It's possible that this is something specific to .NET.  This wouldn't be the first time that I've encountered something that works fine in VB and didn't work in C#.  I'll try to throw together a sample project in C# and submit it through the IssueTrak system.

I appreciate your help.



Posted By: Boyd
Date Posted: 08 March 2005 at 10:01am

I was able to validate in C# that the TaskPanel is not setting the proper AllowedEffects for the item in the Drag operation.

It appears this issue is isolated to controls within the same .NET application.  If I drag/drop to WordPad, it works as expected.  If I drag/drop to a RichTextBox in my application, it lets the user perform all operations.

I've completed a sample project to illustrate this and will be submitting it through the support system.




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