Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Suite Pro
  New Posts New Posts RSS Feed - TaskPanel: New Drag/Drop Modes
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

TaskPanel: New Drag/Drop Modes

 Post Reply Post Reply
Author
Message
Boyd View Drop Down
Senior Member
Senior Member


Joined: 08 December 2003
Location: United States
Status: Offline
Points: 285
Post Options Post Options   Thanks (0) Thanks(0)   Quote Boyd Quote  Post ReplyReply Direct Link To This Post Topic: TaskPanel: New Drag/Drop Modes
    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.

Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 07 March 2005 at 1:31pm
**I updated this with correct syntax**
Maybe try:
wndToolBox.AllowDrag = xtpTaskItemAllowDragCopyOutsideControl Or xtpTaskItemAllowDragWithinControl

Edited by SuperMario
Back to Top
Boyd View Drop Down
Senior Member
Senior Member


Joined: 08 December 2003
Location: United States
Status: Offline
Points: 285
Post Options Post Options   Thanks (0) Thanks(0)   Quote Boyd Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
Boyd View Drop Down
Senior Member
Senior Member


Joined: 08 December 2003
Location: United States
Status: Offline
Points: 285
Post Options Post Options   Thanks (0) Thanks(0)   Quote Boyd Quote  Post ReplyReply Direct Link To This Post 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.

Back to Top
Boyd View Drop Down
Senior Member
Senior Member


Joined: 08 December 2003
Location: United States
Status: Offline
Points: 285
Post Options Post Options   Thanks (0) Thanks(0)   Quote Boyd Quote  Post ReplyReply Direct Link To This Post 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.

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.219 seconds.