BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

TImageList: how to do this?

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Usage)
View previous topic :: View next topic  
Author Message
Lynn Morrison
Guest





PostPosted: Thu Apr 29, 2004 5:11 am    Post subject: TImageList: how to do this? Reply with quote



How do I take a bunch of images I have in a TImageList and place them into a
resource?

I don't want to lose the order because of menus and whatnot already being
setup to use certain indexes of it. Also, I wish to create another list to
load dynamically which has larger icons so I can use both if need be...I
think perhaps a resource file might be the best way?

Anyone have any opinions or options on this?

Thanks,

Lynn


Back to top
JD
Guest





PostPosted: Thu Apr 29, 2004 6:34 am    Post subject: Re: TImageList: how to do this? Reply with quote




"Lynn Morrison" <Cranky (AT) __whisp (DOT) com> wrote:
Quote:
How do I take a bunch of images I have in a TImageList and
place them into a resource?

If they're bitmaps, you can use the Image Editor that come
with BCB but it only supports 16bit (colors) bitmaps.

Quote:
I don't want to lose the order because of menus and what not
already being setup to use certain indexes of it.

As you'll see, the order matters little since you reference
the image by name. I supose you could try something like:

String rcName;
for( int x = 0; x < Count; ++x )
{
rcName.sprintf("IMAGE%02d", x );
// load the resource "IMAGE01" using rcName.c_str()
}

Quote:
Also, I wish to create another list to load dynamically
which has larger icons so I can use both if need be...I
think perhaps a resource file might be the best way?

To be clear, whether in a resource file or embedded TImageList,
they both endup as part of the executable.

Look at this link:

http://www.bcbdev.com/faqs/faq52.htm

and related link:

http://www.bcbdev.com/faqs/faq54.htm

~ JD


Back to top
Lynn Morrison
Guest





PostPosted: Sat May 01, 2004 2:45 am    Post subject: Re: TImageList: how to do this? Reply with quote



Ok, thanks for the info...

Lynn

"JD" <nospam (AT) nospam (DOT) com> wrote

Quote:

"Lynn Morrison" <Cranky (AT) __whisp (DOT) com> wrote:
How do I take a bunch of images I have in a TImageList and
place them into a resource?

If they're bitmaps, you can use the Image Editor that come
with BCB but it only supports 16bit (colors) bitmaps.

I don't want to lose the order because of menus and what not
already being setup to use certain indexes of it.

As you'll see, the order matters little since you reference
the image by name. I supose you could try something like:

String rcName;
for( int x = 0; x < Count; ++x )
{
rcName.sprintf("IMAGE%02d", x );
// load the resource "IMAGE01" using rcName.c_str()
}

Also, I wish to create another list to load dynamically
which has larger icons so I can use both if need be...I
think perhaps a resource file might be the best way?

To be clear, whether in a resource file or embedded TImageList,
they both endup as part of the executable.

Look at this link:

http://www.bcbdev.com/faqs/faq52.htm

and related link:

http://www.bcbdev.com/faqs/faq54.htm

~ JD




Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Usage) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.