Looked in the delphi help and could not find out when one should use each component over the other...
I am wondering what the differences are between these very similar controls:
TImage
, TImageViewer
, and TImageControl
.
I am interested in displaying multiple images on a form, to scroll through in a scrollbox; but all three of those components could be used, and I have no idea which one to choose!
Hi, I've just found this answer (from Alexander Brazda), because I wanted to know as well:
"..If you need to display a simple image (without borders, scroll bars, etc) use TImage this like a fmx primitive like any other shape (TRectangle, TCircle, TEllipse, TPipe, ...)
For an image with a control style (border, background, etc) use TImageControl
and for Zoom, Scroll, Dialogs, etc use TImageViewer.
TImage its simplex (just draw a image over a control where its placed), TSyledControls use a collection of objects to draw and copy values from control properties to style objects.
Of course you can use a TRectangle and Fill it with a TBitmap Brush. Image with WrapMode=Original and BitmapMargins empty would call Canvas.DrawBitmap() with any transformation (except screen scale if defined)..."
You can see the post : Google+ Delphi Developers forum
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With