![]() |
report control drog and drop (SOLVED) |
Post Reply ![]() |
Author | ||
nenkalo ![]() Groupie ![]() ![]() Joined: 02 August 2008 Status: Offline Points: 36 |
![]() ![]() ![]() ![]() ![]() Posted: 02 August 2008 at 5:34pm |
|
hi dear
i want to making two report controls for drog and drop records from one to other control . for examle in report1 we have 10 records and report2 is empty . report1 is source and report2 is destination . when we drag one record from source to destination then report1 has 9 records and report2 has 1 record . but when u pressed "ctrl" and drag any record from any report control to itself , this record duplicate in report ! how i can fix it ? |
||
![]() |
||
Aaron ![]() Senior Member ![]() Joined: 29 January 2008 Status: Offline Points: 2192 |
![]() ![]() ![]() ![]() ![]() |
|
Hi,
You allow droprecords by setting:
cfRecordsSource = wndReportSource.EnableDragDrop("ReportSample:frmDragDrop", xtpReportAllowDrag Or xtpReportAllowDrop)
cfRecordsDestination = wndReportSource.EnableDragDrop("ReportSample:frmDragDrop", xtpReportAllowDrag Or xtpReportAllowDrop)
if you set this with both RC's you are able to drag&drop records in both RC's. That's not what you want.
If you set the source only for dragging and destination for dropping:
cfRecordsSource = wndReportSource.EnableDragDrop("ReportSample:frmDragDrop", xtpReportAllowDrag)
cfRecordsDestination = wndReportDestination.EnableDragDrop("ReportSample:frmDragDrop", xtpReportAllowDrop) allows you to move or copy the selected records only from source to destination.
btw If your issue is solved, please add SOLVED in your Topic description and have a look at post http://forum.codejock.com/forum_posts.asp?TID=11225
|
||
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.... |
||
![]() |
||
nenkalo ![]() Groupie ![]() ![]() Joined: 02 August 2008 Status: Offline Points: 36 |
![]() ![]() ![]() ![]() ![]() |
|
tnx sir !
but by limit draging in first RC and limit dropping in another RC user cant move records from RC1 to RC2 and from RC2 to RC1 ! i want to have biderctional drag and droping between RCs . user must move any record from any report control to another control freely . but must always sum of record in two report control be fix. (copy from one control to itself is invalid . in fact this is my problem !) tnx |
||
![]() |
||
Aaron ![]() Senior Member ![]() Joined: 29 January 2008 Status: Offline Points: 2192 |
![]() ![]() ![]() ![]() ![]() |
|
Hi,
I was testing your issue and found I was doing something wrong myself (I changed my previous reply as well, not to confuse other users)
To disable copying records with CTRL down you can use the events:
Private Sub wndReportSource_OLEDragOver(ByVal Data As XtremeReportControl.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 ((Shift And 2) = 0) Then Effect = vbDropEffectMove Else Effect = vbDropEffectNone End If End Sub Private Sub wndReportDestination_OLEDragOver(ByVal Data As XtremeReportControl.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 ((Shift And 2) = 0) Then Effect = vbDropEffectMove Else Effect = vbDropEffectNone End If End Sub also set:
wndReportSource.OLEDropMode = xtpOLEDropManual
wndReportDestination.OLEDropMode = xtpOLEDropManual and cursor will be changed to NODROP when CTRL is down and now you can only move the records.
|
||
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.... |
||
![]() |
||
nenkalo ![]() Groupie ![]() ![]() Joined: 02 August 2008 Status: Offline Points: 36 |
![]() ![]() ![]() ![]() ![]() |
|
really tnx dear
;) i change titel to solved immediately ;) but 1 smaill question ![]() when we have report control on form and set form.keypreview = true "ESC" code not detected by form when report control have focus . can u help me abt this ? |
||
![]() |
||
Aaron ![]() Senior Member ![]() Joined: 29 January 2008 Status: Offline Points: 2192 |
![]() ![]() ![]() ![]() ![]() |
|
Hi,
try this:
Private Sub wndReportSource_PreviewKeyDown(KeyCode As Integer, ByVal Shift As Integer, Cancel As Boolean)
Me.Caption = KeyCode End Sub Please add SOLVED: <your topic description> and enter your info in your signature as well
|
||
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.... |
||
![]() |
||
nenkalo ![]() Groupie ![]() ![]() Joined: 02 August 2008 Status: Offline Points: 36 |
![]() ![]() ![]() ![]() ![]() |
|
hi . tnx . i know this way . but i want to find one solution to reciving keycode pressed in form . anyway its not important . tnx for everythings ... ![]()
i do it ![]() |
||
Product: Xtreme SuitePro (ActiveX) version 12.0.1
Platform: Windows XP (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 |