Recent

Author Topic: [SOLVED] Moving a Bitmap in Graphics32.  (Read 3090 times)

SteveD

  • Newbie
  • Posts: 6
[SOLVED] Moving a Bitmap in Graphics32.
« on: June 19, 2018, 09:12:36 pm »
Hi,

I'm using Graphics32 as an image viewer in Lazarus.  I have the image centred but I can't find a way to move the image - like when you have the hand grab icon and move it around with the mouse.  I've tried many of the methods and properties, but none of them work.

Thanks,  Steve.
« Last Edit: June 21, 2018, 10:12:33 pm by SteveD »

SteveD

  • Newbie
  • Posts: 6
Re: Moving a Bitmap in Graphics32.
« Reply #1 on: June 21, 2018, 10:07:18 pm »
Ok, I've solved this one.  It's simply:

var distancefromleft,distancefromtop: integer;

Image32.OffsetHorz:=distancefromleft;
Image32.OffsetVert:=distancefromtop;
Image32.BitmapAlign:=baCustom;

Steve.

 

TinyPortal © 2005-2018