drag visualization

drag visualization

Postby Silvio » Wed Dec 17, 2008 1:27 pm

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
Silvio
 
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Postby Antonio Linares » Fri Dec 19, 2008 2:31 pm

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
Antonio Linares
Site Admin
 
Posts: 42122
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: drag visualization

Postby ukoenig » Tue Aug 11, 2009 3:24 pm

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
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: drag visualization

Postby James Bott » Fri Aug 14, 2009 4:45 pm

Uwe,

Try:

Code: Select all  Expand view  RUN
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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA


Return to FiveMac / FivePhone (iPhone, iPad)

Who is online

Users browsing this forum: No registered users and 12 guests