Can't you assign a custom drag object in the object inspector for the component? Just do it at design time or formShow.
DJS --- Dave Sellers <[EMAIL PROTECTED]> wrote: > Sorry, I probably should have said I call > BeginDrag() from my > OnMouseMove event handler. > > Further searching found the following post from Sept > '93: > > <snip> > When you provide a dragObject in the startDrag > event, > and that DragObject handle DragImageList > and you call BeginDrag (false) by yourself, > > the ImageList is draw before the *drag* operation > effectively occurs. > > This is like the BeginDrag (false) react as a > BeginDrag (True). > > > The problem is in the DragInit procedure in > controls.pas: > >> > DragImageList := DragObject.GetDragImages; > if DragImageList <> nil then > with DragStartPos do > DragImageList.BeginDrag(GetDeskTopWindow, X, Y); > QualifyingSites := TSiteList.Create; > if ActiveDrag <> dopNone then > DragTo(DragStartPos); > << > > I think this has to be > > >> > QualifyingSites := TSiteList.Create; > if ActiveDrag <> dopNone then begin > DragImageList := DragObject.GetDragImages; > if DragImageList <> nil then > with DragStartPos do > DragImageList.BeginDrag(GetDeskTopWindow, X, Y); > DragTo(DragStartPos); > end; > << > > Jacques Garcia Vazquez > </snip> > > This looks like it might be the solution but I don't > feel happy changing > controls.pas and I can't seem to recompile it > anyway. I can't even > figure out the scope (if that's the right word) of > the DragInit > procedure so have no idea at all how to 'override' > it. I'm way out of > my depth here - can anyone throw me a line? > > Dave > > > Dave Sellers wrote: > > >Hi > > > >I have implemented some drag and drop with a > TtntStringGrid. I have > >drag mode set to dmManual and in OnMouseDown I call > BeginDrag(False, > >10); Everything works fine except for a small > cosmetic issue. > > > >In my OnStartDrag I assign a custom DragObject and > this is where my > >problem appears. The drag image of my drag object > is displayed > >immediately (to the eye it happens OnMouseDown) > whereas the drag cursor > >seems to take note of the threshold passed into > BeginDrag(). If I set a > >silly threshold of 50 pixels my dragimage appears > immediately at the > >point of mousedown (without a drag cursor) and > stays there until the 50 > >pixes have been moved and then 'jumps' to the new > mouse position (with a > >drag cursor) and moves with the mouse. > > > >I've googled around and found some reference to > something similar > >existing in Delphi 2 but I can't find a workaround. > I've taken a look > >at the code for BeginDrag but to be honest, it's > beyond me. > > > >Can anyone offer any suggestions? I can put > together a demo program if > >necessary to show the effect. > > > >Cheers > >Dave > > > > > > > > > >----------------------------------------------------- > >Home page: http://groups.yahoo.com/group/delphi-en/ > >To unsubscribe: > [EMAIL PROTECTED] > >Yahoo! Groups Links > > > > > > > > > > > > > > > > > > > > > > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ------------------------ Yahoo! Groups Sponsor --------------------~--> Most low income households are not online. Help bridge the digital divide today! http://us.click.yahoo.com/cd_AJB/QnQLAA/TtwFAA/i7folB/TM --------------------------------------------------------------------~-> ----------------------------------------------------- Home page: http://groups.yahoo.com/group/delphi-en/ To unsubscribe: [EMAIL PROTECTED] Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/delphi-en/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

