[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Resize and moving at runtime a TImage component

Posted on 1998-10-30
6
Medium Priority
?
884 Views
Last Modified: 2008-02-01
How I can be able to resize and move an TImage component
or other Delphi component  (Tbutton, TStaticText) exactly
like when I use the same components at design time and move on the form.
0
Comment
Question by:mcretu
[X]
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
6 Comments
 

Author Comment

by:mcretu
ID: 1345043
Edited text of question
0
 
LVL 4

Expert Comment

by:davidmwilliams
ID: 1345044
Do you mean that you want the user to be able to click on the control and move it around the form, at run-time?
0
 

Expert Comment

by:Yoni
ID: 1345045
Well, I know how you can move any control easily but I cant help you about the resizing...
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 3

Accepted Solution

by:
bryan7 earned 100 total points
ID: 1345046
It's very essy:
i.e: to move a button named "button1"

Button1.Left:= 25; <------ x coord
Button1.Right:= 46; <------y coord

To Resize it:

Button1.Width:=  95;
Button1.Height:=  24;

You can do this with an image too.

bryan


0
 

Author Comment

by:mcretu
ID: 1345047
Hi,
I'm so sorry but I wasn't not at all explicit in my question and this is it's my fault.
I'll put in different words my question:
I need to use an component (a component who is descendent from TImage or TButton or TPanel) which I'll be able to move and resizing at run-time with the cursor along the form.
How I can create an component from TImage who can have the methods or properties to move and resize dynamicaly at run-time ?
(I make comparasion with design-time, because when you drop several components into a
form you can move and resize with the mouse without problems).
Still for me it's a big question how I can manage these things.

0
 
LVL 3

Expert Comment

by:bryan7
ID: 1345048
hi !

why did u accept my answer then ? You should have rejected it and wait for more comments..
The only I know to move a component at run time, I think is:

Set to AUTOMATIC the drag and drop property of the component, and i.e for a button,
on the OnDragDrop event, put this code:

Button1.Left:= x;
Button1.Top:= y;

But I'm not sure,

Anyway, your question is one that I was gonna make one of these days, so I'm also
interested in knowing how to do it.
Tomorrow I'll drop your same question, so you can also have the answer.

bryan =)

0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
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 this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

649 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