Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Controls
  New Posts New Posts RSS Feed - BUG: Xtreme Suite ListBox.OLEDragDrop and TDBGrid6
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

BUG: Xtreme Suite ListBox.OLEDragDrop and TDBGrid6

 Post Reply Post Reply
Author
Message
Jean View Drop Down
Senior Member
Senior Member
Avatar

Joined: 11 December 2006
Status: Offline
Points: 110
Post Options Post Options   Thanks (0) Thanks(0)   Quote Jean Quote  Post ReplyReply Direct Link To This Post Topic: BUG: Xtreme Suite ListBox.OLEDragDrop and TDBGrid6
    Posted: 25 May 2009 at 9:05am
If you drop data from a TrueDB Grid 6.0 OLEDB (Build 6.0.0253) on a Xtreme Suite ListBox something goes wrong. With Microsoft ListBox there's no problem.

Try this code. Drag from TDBGrid to a XtremeSuiteListBox --> The data(1) is missing. 
Option Explicit

'DRAG SOURCES
Private Sub Command2_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
    If Button = 1 Then
        Command2.OLEDrag
    End If
End Sub

Private Sub Command2_OLEStartDrag(Data As DataObject, AllowedEffects As Long)
    Data.SetData CStr(Now()), 1
    AllowedEffects = vbDropEffectCopy
End Sub

Private Sub TDBGrid1_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
    If Button = 1 Then
        TDBGrid1.OLEDrag
    End If
End Sub

Private Sub TDBGrid1_OLEStartDrag(ByVal Data As TrueOleDBGrid60.DataObject, AllowedEffects As Long)
    Data.SetData CStr(Now()), 1
    AllowedEffects = vbDropEffectCopy
End Sub

'DROP TARGETS
Private Sub Form_Initialize()
   List1.OLEDropMode = 1
   ListBox2.OLEDropMode = 1
End Sub

Private Sub List1_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, x As Single, y As Single)
    List1.AddItem "GetFormat(1)=" & Data.GetFormat(1)
    List1.AddItem "GetData(1)=" & Data.GetData(1)
    List1.ListIndex = List1.NewIndex
End Sub

Private Sub ListBox2_OLEDragDrop(ByVal Data As XtremeSuiteControls.DataObject, Effect As Long, ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Single, ByVal y As Single)
    ListBox2.AddItem "GetFormat(1)=" & Data.GetFormat(1)
    On Error Resume Next
    ListBox2.AddItem "GetData(1)=" & Data.GetData(1)
    If Err.Number <> 0 Then
        ListBox2.AddItem "Error " & Err.Number & ": " & Err.Description
    End If
    ListBox2.ListIndex = ListBox2.NewIndex
End Sub


Is there a solution?
Product: Xtreme SuitePro (ActiveX) Version 15.0.2
Platform: Windows XP (32bit) German - SP 2
Language: VB6 / C# 4.0
Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1354
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 25 May 2009 at 8:22pm
I can confirm that it is a problem with TrueDBGrid 8.0 as well. Haven't found a workaround though. Seems to be a problem with either the TrueDBGrid or Codejock IDataObject implementation.
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

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