|
|||
|
Hi Folks,
I'm digging out old thread because my DragOver (neither of window's or control's) never gets called. Both clients (MyRightSLE and oDCbBrowser) are enabled as drag clients and Drop() works. Only DragOver() does not. Why? Where shall I look for an error (it there is any)? (VO2.8SP1 b2822) CLASS DragBBrowser INHERIT BBROWSER METHOD DragOver(oDragEvent) CLASS DragBBrowser LOCAL iCount AS INT LOCAL lAcceptDrop AS LOGIC // Check files that are being dragged over the window // Only accept if all files are .DBF lAcceptDrop := TRUE FOR iCount := 1 TO oDragEvent:FileCount IF RAt(".PDF", oDragEvent:FileName(iCount)) == 0 lAcceptDrop := FALSE EXIT ENDIF NEXT RETURN lAcceptDrop CLASS MyRightSLE INHERIT DATAWINDOW PROTECT oDCbBrowser AS DRAGBBROWSER //{{%UC%}} USER CODE STARTS HERE (do NOT remove this line) METHOD DragOver(oDragEvent) CLASS MyRightSLE LOCAL iCount AS INT LOCAL lAcceptDrop AS LOGIC #IFDEF __DEBUG DebOut("DragOver MyRightSLE") #ENDIF // Check files that are being dragged over the window // Only accept if all files are .DBF lAcceptDrop := TRUE FOR iCount := 1 TO oDragEvent:FileCount IF RAt(".PDF", oDragEvent:FileName(iCount)) == 0 lAcceptDrop := FALSE EXIT ENDIF NEXT RETURN lAcceptDrop |
|
|
||||
|
||||
|
|
|
|||
|
Grzegorz
Reading the bBrowser help file - there is NO DragOver() method. Try using the DragDrop() method and testing for BCDM_DRAGOVER in the callback event. Could be a similar prob;em with the window but I'll leave you to read the help file<g> CYA Steve |
|
|||
|
On 23 Lut, 01:24, "Stephen Quinn" <stevej...@bigpondSPAM.net.au>
wrote: > Grzegorz > > Reading the bBrowser help file - there is NO DragOver() method. > Try using the DragDrop() method and testing for BCDM_DRAGOVER in the > callback event. > > Could be a similar prob;em with the window but I'll leave you to read the > help file<g> > > CYA > Steve Hello Stephen, thank You for replying but... even if there is no DragOver() for bBrowser but IS for DataWindow - and this is not called either... The example above is just same as in helpfile (VO). I can drag and drop (to both window and bbrowser as control) BUT I can't check if drop is accepted/rejected before Drop just because DragOver is not called. Everything above is just from VO helpfile (Help->DragDropClient Class) Gregory |
|
|||
|
Grzegorz
> even if there is no DragOver() for bBrowser but IS for DataWindow - > and this is not called either... DataWindow is a combination of several Window types - it's in the help<g> You probably need to talk with the hidden 'Window' part of the DataWindow Add something like the following to your subclassed datawindow - you'll need to check the SDK or search Google groups for the correct internal variable as I'm writing this from memory ACCESS xSurface CLASS WhateverDataWindow RETURN SELF:_Surface This should allow you to talk with the hidden part of the DataWindow for your DragDrop stuff. Eg IF SELF:xSurface ragOver()If not then you'll probably need to use the Dispatch() method to capture the messages. What your experiencing has been covered in the past (see Google groups), there's probably a demo available online. Have you checked KnowVO or Cavo.com for sample code?? CYA Steve |
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|