Hi!
I am playing around a bit with drag and drop.
I am having a form with e.g. 10 equal sized buttons.
Now I want after dragging a button and drop onto the form to position the button in kind of grid with dimensions as dimensions of the buttons. Because I want to position the buttons in a neat way besides each others or under/above each other.
From the help-file I learnt the control will be positioned according:
So for proper locating on the form nYcoord should be rounded to a multiple of button.width
Same for vertical nXcoord must be a multiple of button.height.
I don't know how to. Must be not be that difficult but just don't know the syntax.
-Bart
I am playing around a bit with drag and drop.
I am having a form with e.g. 10 equal sized buttons.
Now I want after dragging a button and drop onto the form to position the button in kind of grid with dimensions as dimensions of the buttons. Because I want to position the buttons in a neat way besides each others or under/above each other.
From the help-file I learnt the control will be positioned according:
Code:
LPARAMETERS oSource, nXCoord, nYCoord
oSource.Move ((nXCoord - oSource.Width / 2), (nYCoord - oSource.Height / 2))
Same for vertical nXcoord must be a multiple of button.height.
I don't know how to. Must be not be that difficult but just don't know the syntax.
-Bart