Re: How could I create components at runtime and move them


[ Related Articles and Replies ] [ DelphiLand FAQ ] [ Delphi Tutorials ]

Posted by WAllison on January 08, 2002 at 13:59:04:

In Reply to: How could I create components at runtime and move them posted by Danu on January 08, 2002 at 13:37:30:

: I need to write send me some informations about:
: 1) Creating controls at runtime (i.e. selecting the type of the control from a toolbat) and
: 2) Moving them using the mouse until their position
: fits the user needs.

: Actually, there is something like even the Delphi IDE does at the design time when creating the forms...
: If you can help me you'll get the final product of my work and the complete code source as a reward.


In each of the components - Use OnMouseDown event to check that the left mouse is pressed - Modify the components Left and Top property with The X,Y vars - you might need to use the OnMouseMove event to do that. If u still have probs - let me know and i'll send u a bit of source.

Waz


Related Articles and Replies


[ Related Articles and Replies ] [ DelphiLand FAQ ] [ Delphi Tutorials ]