Page 1 of 1

TMS Component

PostPosted: March 24th, 2009, 8:43 pm
by Blod
Hello,

Can anybody help with the following please?
Some time ago I installed a free TMS components set from a magazine

disk.
One of the components I would like to use is Picture container.
This component is like an imagelist but will hold Windows Metafiles

which is what I need.
There is no help provided with these components and Picture container

only publishes three properties in the Object inspector.
They are an items property which is used to add files to the container, a

tag property and finally the name property.

I can't work out how to use this component to be able to assign a file

from it to a delphi image.
Has anybody used this component?

Thanks in advance?

Blod

Re: TMS Component

PostPosted: March 24th, 2009, 11:53 pm
by kokkoras
Are the two formats (the one used in the component and the Delphi image) compatible ?

Accesing an image of the component should be somthing like TMSComponent.items[i]

Re: TMS Component

PostPosted: March 25th, 2009, 1:45 pm
by Blod
I had tried something like you suggested
image1.picture:=picturecontainer1.items[0];
and the compiler reports as follows...
[Error] testing.pas(34): Class does not have a default property.

Blod

Re: TMS Component

PostPosted: March 26th, 2009, 10:43 am
by Kambiz
Maybe it keeps only filename of the image.

Re: TMS Component

PostPosted: March 27th, 2009, 2:18 pm
by Blod
I found a link with some information but I think this component is for web applications only

http://www.tmssoftware.com/site/piccont.asp

Re: TMS Component

PostPosted: March 27th, 2009, 4:52 pm
by JohnG
Hello,

The PictureContainer is part of a set of "HTML" components from TMS. These components use HTML tags for formatting and linking. They're intended for use in regular Windows applications (not web applications).

See this page for a "Mini HTML" reference:
http://www.tmssoftware.com/site/minihtml.asp

Try this code for getting at the images in the container (Image1 is a TImage component):
Code: Select all
Image1.Picture.Assign(PictureContainer1.Items.Items[0].Picture);


hth,
John

Re: TMS Component

PostPosted: March 27th, 2009, 8:14 pm
by Blod
Thanks John
I'll try that code

Re: TMS Component

PostPosted: March 28th, 2009, 10:57 am
by Blod
Yes that works fine.

Thanks to all Posters

Blod

Re: TMS Component

PostPosted: April 2nd, 2009, 4:09 am
by kokkoras
How about this:

Image1.Picture.LoadFromFile( PictureList1.Thumbnails.Items[0].Filename );

where

PictureList1: TPictureList; //(TMS component)
Image1: TImage; //(Delphi Component)

PictureList1 holds the thumbnail data and the filename to the big picture.

Re: TMS Component

PostPosted: April 3rd, 2009, 1:34 pm
by Blod
Thanks,
I'll give that a try also