How to drag records to TreeView-control |
Post Reply |
Author | ||
CapoPezzio
Groupie Joined: 13 April 2010 Status: Offline Points: 25 |
Post Options
Thanks(0)
Posted: 30 September 2010 at 2:38pm |
|
I wonder if anyone can show me how to drag and drop records from a ReportControl to a node in a TreeView-control(Codejocks Treeviewcontrol. Small example would be nice. Thank you
|
||
Product: Xtreme SuitePro (ActiveX) version 13.3.1
Platform: Windows 7 (32bit) Language: Visual Basic 6.0 |
||
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
|
Here's a basic example (you should check whether or not the dropped data is from a ReportControl in your production code).
|
||
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
||
CapoPezzio
Groupie Joined: 13 April 2010 Status: Offline Points: 25 |
Post Options
Thanks(0)
|
|
Thank you jpbro. Do you know how I can find wich node(the index) in the tree the records are dropped to, so I can add my records under that node
|
||
Product: Xtreme SuitePro (ActiveX) version 13.3.1
Platform: Windows 7 (32bit) Language: Visual Basic 6.0 |
||
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
|
You can use the HitTest method of the TreeView control to determine the node that the mouse is over when the drop operation occurs. So:
Interestingly, your posts have turned up 2 apparent bugs in the TreeView control: 1) You can't set the OleDropMode property in code only, you must set it in the VB6 property browser. 2) The Treeview doesn't update the +/- icon after you add items in the OleDragDrop event, so you have to hide/show the control as a hack/workaround to refresh it. CAN ANYONE CONFIRM THESE BUGS IN 13.4.1? I haven't installed it yet, but I'd like to know if they are still bugs before I open tickets. Thanks. |
||
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
||
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
|
Hi Jason,
I tried with V13.4.1 and problem 1 seems to be solved so I guess you have to open one ticket (for plus/minus issue)
btw Jason, I'm not able to copy/paste your code in "normal way". I have to click QUOTE and copy/paste your code (between the [code] section) Only this way it will be pasted right way. Is there another way to get the code? Thanks in advance.
|
||
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
||
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
|
Hi Aaron, thanks for testing it out, I'll open a ticket.
I don't know why you can't copy & paste my code - I've just put it between {code}{/code} tags (with square brackets, not braces), and I am able to copy & paste it fine. How do you post your code snippets? |
||
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
||
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
|
Hi,
I just type code in message as text (if code is too long, most of the time I upload test project)
So if I copy above from forum I get this:
'Test copy/paste (I put the code in brackets as well)
With Me.wndReportControl With .PaintManager .ColumnStyle = xtpColumnOffice2007 .FormulaSumColor = vbRed End With End With |
||
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
||
jpbro
Senior Member Joined: 12 January 2007 Status: Offline Points: 1355 |
Post Options
Thanks(0)
|
|
Ah, I see it is a problem with Internet Explorer - I use Firefox, and it works fine for copying and pasting text from within the code tags. I don't know if it's a forum bug or an IE bug.
I'll try to upload test projects, it's just a bit more time consuming... |
||
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3 Language: Visual Basic 6.0 SP6 |
||
CapoPezzio
Groupie Joined: 13 April 2010 Status: Offline Points: 25 |
Post Options
Thanks(0)
|
|
Thanks a lot you guys. I now manage to drag and drop records from the reportcontrol to the treeview. But I have a new drag and drop-problem with the TreeView-control(This should maybe be in the Controls section). I cant manage do drag and drop nodes within the TreeView-control. Drag Reportcontrol-records to a treeview-node works fine, but I cant drag and drop a treeview-node to another treeview-node., I dont get any events. I dont get to show the PlusMinus-sign on the Treeviewcontrol-nodes when I have icons on the nodes either. Someone help please?
|
||
Product: Xtreme SuitePro (ActiveX) version 13.3.1
Platform: Windows 7 (32bit) Language: Visual Basic 6.0 |
||
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 |