Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Rezising objects with mouse (runtime)

Posted on 1999-07-13
Medium Priority
Last Modified: 2010-04-06
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?
Question by:tonitop
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 12

Accepted Solution

rwilson032697 earned 400 total points
ID: 1388275
Use this to get the handles:

I think this also allows for easy resizing using the mouse events.




Expert Comment

ID: 1388276
I know how you can move it at run time.. ( dragging with the mouse.. like in desing time ) if you are interested also

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question