Difference between revisions of "ATImageBox"

From Free Pascal wiki
Jump to navigationJump to search
(New page)
 
 
(2 intermediate revisions by the same user not shown)
Line 7: Line 7:
 
* center image
 
* center image
 
* scale image
 
* scale image
 +
 +
[[File:ATImageBox.png]]
  
 
Usage:
 
Usage:
Line 32: Line 34:
 
= Download =
 
= Download =
  
Github: https://github.com/Alexey-T/ATImageBox-Lazarus
+
GitHub: https://github.com/Alexey-T/ATImageBox-Lazarus
 
 
= Requirements =
 
 
 
Lazarus: 1.8+
 
  
 
[[Category:Components]]
 
[[Category:Components]]

Latest revision as of 19:39, 4 March 2022

About

This is TScrollBox with embedded TImage. Control can auto position image inside, using options:

  • fit image (by total size, by width only, by height only)
  • fit only bigger image
  • center image
  • scale image

ATImageBox.png

Usage:

  • Methods LoadFromFile, LoadPicture loads an image.
  • Props Opt* are new published props.
  • Public props: ImageWidth, ImageHeight, ImageZoom (scale in percents).

Author: Alexey Torgashin

Hotkeys

Keyboard hotkeys:

  • arrows: scroll by small step
  • Ctrl+arrows: scroll to edge
  • Home, End, PgUp, PgDown: scroll by big step

Mouse:

  • dragging of image (when image is bigger)
  • Ctrl+ mouse wheel: zoom in/out
  • Shift+ mouse wheel: horizontal scroll

Download

GitHub: https://github.com/Alexey-T/ATImageBox-Lazarus