Drag / Drop on |
Post Reply |
Author | |
XiMaker
Groupie Joined: 11 December 2009 Location: United States Status: Offline Points: 23 |
Post Options
Thanks(0)
Posted: 21 December 2009 at 6:58pm |
I'm using the TaskPanel as a navigation menu for an MDI application - I allow users to also Drag/Drop items on the task panel to launch other applications. I've added the code to do the drag drop and it works for external programs to be dropped into the task panel but when I try to move items already in the taskpanel menu to a new location (drag up or drag down) the items vanish. The problem in part is due to the GetFormat because the items dragged don't have either format but I don't know that to check on- is there a different OLEDrag setting that I need to use for this type... is there a sample for this?
Private Sub wndToolBox_OLEDragDrop(ByVal Data As XtremeTaskPanel.DataObject, Effect As Long, ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Single, ByVal y As Single) Const MODULE_NAME = "wndToolBox_OLEDragDrop" Dim Text As String Dim Index As Long Dim Ext As String Dim icount As Integer Dim iIndex As Integer Dim Group As TaskPanelGroup Dim fullpath As String Dim tItem As TaskPanelGroupItem If (Data.GetFormat(vbCFText)) Then Effect = vbDropEffectCopy Text = Data.GetData(vbCFText) ElseIf Data.GetFormat(vbCFFiles) Then Effect = vbDropEffectCopy For Each file In Data.Files fullpath = file Ext = LCase(Right(file, 3)) ' Remove the extension Text = Left(file, Len(file) - 4) Do Index = InStr(Text, "\") If Index <= 0 Then Exit Do End If Text = Right(Text, Len(Text) - Index) Loop Set Group = frmMain.MainMenuPane.wndToolBox.FocusedItem.Group CreateToolboxEXEItem Group, Text, fullpath bSaveMenuINI = True Next Else 'Effect = vbDropEffectNone End If End Sub Private Sub wndToolBox_OLEDragOver(ByVal Data As XtremeTaskPanel.DataObject, Effect As Long, ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Single, ByVal y As Single, ByVal state As Integer) If (Data.GetFormat(vbCFText)) Then Effect = vbDropEffectCopy ElseIf Data.GetFormat(vbCFFiles) Then Effect = vbDropEffectCopy Else ' Effect = vbDropEffectNone End If End Sub |
|
XiMaker
Groupie Joined: 11 December 2009 Location: United States Status: Offline Points: 23 |
Post Options
Thanks(0)
|
Anyone got anything for me on this one?
|
|
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 |