Home All Groups Group Topic Archive Search About
Author
25 Nov 2006 7:33 PM
Marc
Hi,

Anyone know how I can have my drag and drop form controls 'snap' to a
grid like in windows desktop?

Author
26 Nov 2006 5:27 PM
Dennis
Divide your window (or whatever you are dragging the controls to) up into a
grid based on the size of grid elements and store these in an array (either
two dimensional or use a structure).  When the user drops the control onto
your window, determine the x,y nearest in your grid to where the control is
dropped then change the location of the control to that x,y.
--
Dennis in Houston


Show quoteHide quote
"Marc" wrote:

> Hi,
>
> Anyone know how I can have my drag and drop form controls 'snap' to a
> grid like in windows desktop?
>
>