TaskPanel: New Drag/Drop Modes |
Post Reply |
Author | |
Boyd
Senior Member Joined: 08 December 2003 Location: United States Status: Offline Points: 285 |
Post Options
Thanks(0)
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:
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. |
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
**I updated this with correct syntax**
Maybe try: wndToolBox.AllowDrag = xtpTaskItemAllowDragCopyOutsideControl Or xtpTaskItemAllowDragWithinControl Edited by SuperMario |
|
Boyd
Senior Member Joined: 08 December 2003 Location: United States Status: Offline Points: 285 |
Post Options
Thanks(0)
|
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.
|
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
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. |
|
Boyd
Senior Member Joined: 08 December 2003 Location: United States Status: Offline Points: 285 |
Post Options
Thanks(0)
|
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. |
|
Boyd
Senior Member Joined: 08 December 2003 Location: United States Status: Offline Points: 285 |
Post Options
Thanks(0)
|
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. |
|
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 |