Print Page | Close Window

BUG: Xtreme Suite ListBox.OLEDragDrop and TDBGrid6

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Controls
Forum Description: Topics Related to Codejock Controls
URL: http://forum.codejock.com/forum_posts.asp?TID=14376
Printed Date: 04 July 2024 at 9:15pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: BUG: Xtreme Suite ListBox.OLEDragDrop and TDBGrid6
Posted By: Jean
Subject: BUG: Xtreme Suite ListBox.OLEDragDrop and TDBGrid6
Date 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



Replies:
Posted By: jpbro
Date 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




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