Scrolling in TImage


Does anyone know how to scroll within a TImage window. I wish to have a bitmap that is greater than the area I wish to display ( I do not wish to use stretch as this shrinks the picture).

I wish to scroll either by moving the cursor inside the image or with scroll bars.

In addition is there anyway to zoom the bitmap within the window.

If TImage does not do the job, is there any other components available that will do the job.


Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

hmm chrisberry,

what about to drop a scrollbox on your form,
then drop a timage on it (topleft 0,0-Autosize true)
load your picture into it
(just not tested yet)


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Brilliant Meikl!
Hi Chris,

As for zooming, do what Meikl said but drop a paintbox instead. Set the paintbox width to zoomfactor * width and the height to zoomfactor * height.

In the OnPaint event of the paintbox, use stretchdraw to scale the bitmap.

(The bitmap could be a private form variable that you create in the FormCreate event, and free in the FormDestroy event. Alternatively, add a TImage and load a bitmap into it. Make the TImage invisible, and paint to the paint box using PaintBox1.Canvas.StretchDraw(Image1.Picture.Bitmap, ...

Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

Quick and very good answers !
Hi, meikl
supposing you did get my second mail i'm gonna ask now some
take care, barry's still on the run
hi indi,
yup you're right, i got your second mail,
mann vergeht die zeit schnell,
schon ueber eine woche her,
sorry for no response :-(

i can solve some parts of your request in a short term,
i will send it tomorrow (hoffentlich klappt das)
but you are free to ask here.

about barry, i'm sure he will catch me soon.

meikl ;-)
I don't know, why i get this internal server error.
All test are going well
but not, what i wanna post here  
yeah, the great kiwi's got time enough as a prisoner
in the foreign England to answer everything he knows, and
he knows a lot. But sometimes i wonder, how he get's all
the points so quickly. Once i've been in EE for half an our
and suddenly his points raised up by 2000( Same with rWilson....) Well, no doubts about it,s ok, i guess.
Now he's a little bit flustered, cause his AB's (All Blacks NZ Team) lost in the semifinals of the
Rugby World Championchip in a very bad manner
against the european team of France.
I'm afraid, he'll die, if they gonna loose today against SA fighting for third place. The bets on ITV are 52-48 South Afrika...
Heh, Barry, far away from home the pain is double as hard, but don't lose heart, man !
Well, meikl
in my case there is no reason for you to be in a hurry.
I can wait some more days, no problem
Relax ruhig mal, soll Wunder wirken !
Aber ein, zwei Antworten waeren schon klasse ! bis dann Indi
the ! at the end of a line !
ChrisBerryAuthor Commented:
Thanks for all the answers.

Works fine - never used scroll box before so I never thought of this.


It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.