2

I tried to use Timage component to setup the background (as exemplified here) but I have figure out that Timage doesn't have Picture properties anymore so I can't load it, is there any other way to load it?

I use rad studio xe7, maybe that's the problem.

Community
  • 1
  • 1
Andrei E.
  • 61
  • 2
  • 7
  • 1
    That sounds extremely peculiar. Are you using VCL or FMX? XE7 VCL TImage has a Picture property for me. – Jerry Dodge Apr 28 '15 at 17:02
  • 1
    The VCL `TImage` does indeed have a `Picture` property. Which means that you are using FMX. So, do you want to know how to display a background, or do you want to know how to use `TImage`? – David Heffernan Apr 28 '15 at 17:06
  • There is a documentation for the component (and a lot more) here http://docwiki.embarcadero.com/Libraries/XE7/en/FMX.Objects.TImage_Properties – Sir Rufo Apr 28 '15 at 17:07
  • 1
    I want to know how to display a background when using fmx . – Andrei E. Apr 28 '15 at 17:08
  • When using FMX (depending on the version), you can make a background on the form itself without a separate control. – Jerry Dodge Apr 28 '15 at 17:09
  • I'll try with Image1.Bitmap.LoadFromFile('MyImage.jpg') , but it doesn't get deplayed in my properties either the bitmap property. – Andrei E. Apr 28 '15 at 17:10
  • 1
    Why don't you ask that question, instead of this one. I suggest that you start again with a major edit. Ask about displaying a background on an FMX form, rather than about TImage. You might take a look at this: http://docwiki.appmethod.com/appmethod/1.13/codeexamples/en/FMX.Mobile.Forms_Sample_(Object_Pascal) – David Heffernan Apr 28 '15 at 17:14

1 Answers1

3

You can still use TImage in FMX. It has just been extended to support the large variety of resolutions when developing for multiple targets. Use the property MultiResBitmap to load your image, then set WrapMode to e.g. stretch (if you want your image to be stretched).

Hans
  • 2,220
  • 13
  • 33
  • That's not true. The FMX `TImage` has not been extended. It's a totally different control from the VCL `TImage`. – David Heffernan Apr 29 '15 at 07:24
  • I meant 'Extended' from a user perspective. It is still there and it can still do similar things as the VCL TImage, but the 'Bitmap' has been 'extended' to handle multiple resolutions. – Hans Apr 29 '15 at 08:19