Page 1 of 1

help about oget1:ldrag:=.t.

PostPosted: Wed Nov 30, 2005 10:28 am
by Piscicelli Zingoni
I have this little example:



... get oget1 var pippo1
... get oget2 var pippo2

oget1:ldrag:=.t.
oget2:ldrag:=.t.
oget1:bMoved:={ || myfunction() }


activate ....

Now i want to move pippo1 and while i move it i want call a myfunction().

The above example only call the myfunction() after i release the button mouse.

I also tried with oget1:bMMoved:={ || myfunction() } (tks to EMG) but nothing happens.
Any Help ?
Tks
Piscicelli/Zingoni

PostPosted: Wed Nov 30, 2005 6:56 pm
by Antonio Linares
Piscicelli,

A little fix is required for Class TGet, please modify source\classes\tget.prg method MouseMove like this:
Code: Select all  Expand view
METHOD MouseMove( nRow, nCol, nKeyFlags ) CLASS TGet

   if ::lDrag
      return Super:MouseMove( nRow, nCol, nKeyFlags )
   else
      ::oWnd:SetMsg( ::cMsg )        // Many thanks to HMP
      if ::oCursor != nil
         SetCursor( ::oCursor:hCursor )
      else
         CursorIBeam()
      endif
      ::CheckToolTip()

      // New !!!
      if ::bMMoved != nil
         return Eval( ::bMMoved, nRow, nCol, nKeyFlags )
      endif

   endif

return nil

PostPosted: Fri Dec 02, 2005 12:28 pm
by Piscicelli Zingoni
I fix my tget (fwh24) and i include it in my link but if i use:

oget1:bMoved:={ || myfunction() }

myfunction() is called only when i relase the left mouse button

while if i use

oget1:bMMoved:={ || myfunction() }

nothing happens

any help
Piscicelli/Zingoni