help about oget1:ldrag:=.t.

Post Reply
Piscicelli Zingoni
Posts: 76
Joined: Wed Oct 12, 2005 5:52 pm
Location: Milan,Italy

help about oget1:ldrag:=.t.

Post 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
User avatar
Antonio Linares
Site Admin
Posts: 42516
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Has thanked: 31 times
Been thanked: 73 times
Contact:

Post 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

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
regards, saludos

Antonio Linares
www.fivetechsoft.com
Piscicelli Zingoni
Posts: 76
Joined: Wed Oct 12, 2005 5:52 pm
Location: Milan,Italy

Post 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
Post Reply