drag visualization

Post Reply
User avatar
Silvio
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

drag visualization

Post by Silvio »

Antonio,
on a form whe n I take an control I want show on cursor the control and then I move the mouse on row,col and when I release the button of the mouse it draw the control on row,col ( of the mouse) .
Howe I can make it ?
Best Regards, Saludos

Falconi Silvio
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Silvio,

Please review fwh\samples\TestDrp3.prg

You can change a control position doing:
oControl:nTop := ...
oControl:nLeft := ...
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
ukoenig
Posts: 3981
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

Re: drag visualization

Post by ukoenig »

Antonio,

to make it easier, to place Logos or Vtitles on a defined Position inside a Dialog,
is it possible, to get the Screen-Position ( Top / Left ) for a given ID-Number of a Control from Resources ?

Sample :
I want to place with ABpaint a Logo above a Get-Field with ID 100 ( Position Top = 100, Left = 20 )

The Top / Left Calculation of the Logo would be :
Top = Get-Top - Space - Logo-Height
Left = Get Left

It would make it much easier, to place something on Screen in Relation to a Control.

Thank You
Best Regards
Uwe :lol:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
James Bott
Posts: 4654
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA
Contact:

Re: drag visualization

Post by James Bott »

Uwe,

Try:

Code: Select all

nID := 100

for i:= 1 to len( oDlg:aControls )
   if oDlg:aControls[i]:nID == nID
      nTop:= oDlg:aControls[i]
      nLeft:= oDlg:aControls[i]
   endif
endif
James
Post Reply