Link to home
Start Free TrialLog in
Avatar of tonitop
tonitop

asked on

Rezising objects with mouse (runtime)

How can I resize objecst (e.g. buttons, labels etc. etc.) with mouse? I can create button like this:
bu: TButton;
bu := TButton.Create(self);
bu.Parent := self
etc. etc.
and I can resize it by setting width/height, but how can I do these with mouse? I'm looking to do exactly the same thing at runtime as I can do in design mode (drag and drop objects on to form, rezise and drag them etc.).

One thing that comes to mind is that I use onMouseUp/onDrag etc. events. That way I could drag and drop objects. But how do I rezise them? I could probably do something like onClick event. If mouse is near button (but not above it) and user has pushed button and moves mouse then I would somehow resize it. This sound little complicated, doesn't it? And how do I get those 8 black things (those you see when you click button when you are in design mode) around my button? It's like a frame or something around the button?

Is there a component which would do this (freeware prefered) or how can I make it?
ASKER CERTIFIED SOLUTION
Avatar of rwilson032697
rwilson032697

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I know how you can move it at run time.. ( dragging with the mouse.. like in desing time ) if you are interested also