Recent

Author Topic: [SOLVED] Getting started with images  (Read 1801 times)

PhilHibbs

  • Newbie
  • Posts: 2
[SOLVED] Getting started with images
« on: January 26, 2015, 06:55:46 pm »
I'm just starting out with Lazarus having used Delphi a bit back when it was new (i.e. A Long Time Ago).

I want to create a blank bitmap, draw some text on it, and then copy sections of it onto an image control on a form. So I need a TImage on the form, and I'm guessing a TPicture in the form module's private section. But how do I set the dimensions of the TPicture? It's created with width and height of 0, and they're read-only properties. Is TPicture the right thing to use here? If so, how do I initialize it, and if not, what should I be using?
« Last Edit: January 26, 2015, 07:07:45 pm by PhilHibbs »

PhilHibbs

  • Newbie
  • Posts: 2
Re: Getting started with images
« Reply #1 on: January 26, 2015, 07:07:07 pm »
Why is it that I can spend an hour struggling with a problem, and then 2 minutes after posting to a forum, I solve it?

I'm now setting MyPicture.Bitmap.Width and MyPicture.Bitmap.Height and that's working!

 

TinyPortal © 2005-2018