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 

Newbie: TreeView ImageList

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Graphics
View previous topic :: View next topic  
Author Message
Derrick Erwee
Guest





PostPosted: Wed Mar 09, 2005 5:43 pm    Post subject: Newbie: TreeView ImageList Reply with quote



Hi there.

I'm using D7, TTreeView, TImageList and Bitmaps(BMP 16x16),
Default parameters for the Treeview and ImageList except the following:
Treeview1.Images := ImageList;
TreeView1.StateImage := nil;


I have a lot of items loaded dynamically onto the treeview and I set their
Imageindex to the relevant ImageIndex in the ImageList. If a user deletes an
item, the image should have a little cross over the normal image. Creating
duplicate images with a cross over is not my style.
So I am trying to use a mask that I put over the image when it is deleted,
so that I can show a history trail.

After a day of trying with no sucess. I have come to the conclusion that I
am either stupid, or missing something critical or both.

Can someone please enlighten me...

D

PS Bitmaps can be changes to anything else that can be dumped into a .res
file.


Back to top
Peter Below (TeamB)
Guest





PostPosted: Thu Mar 10, 2005 7:36 pm    Post subject: Re: Newbie: TreeView ImageList Reply with quote



In article <422fde3b (AT) newsgroups (DOT) borland.com>, Derrick Erwee wrote:
Quote:
I'm using D7, TTreeView, TImageList and Bitmaps(BMP 16x16),
Default parameters for the Treeview and ImageList except the following:
Treeview1.Images := ImageList;
TreeView1.StateImage := nil;

I have a lot of items loaded dynamically onto the treeview and I set their
Imageindex to the relevant ImageIndex in the ImageList. If a user deletes an
item, the image should have a little cross over the normal image. Creating
duplicate images with a cross over is not my style.
So I am trying to use a mask that I put over the image when it is deleted,
so that I can show a history trail.

After a day of trying with no sucess. I have come to the conclusion that I
am either stupid, or missing something critical or both.

This is more a question for b.p.d.vcl.components.using.win32 than for
graphics. Anyway: an imagelist allows you to define up to four of its images
as overlay images. You do that using the imagelists Overlay method. The
overlays get an independent index from 0 to 3. This you can then use for the
OverlayIndex property of a TTreenode.

So, put an image with your x overlay into the imagelist, call the Overlay
method to define it as overlay #0, then set your nodes Overlayindex to 0.

--
Peter Below (TeamB)
Use the newsgroup archives :
http://www.mers.com/searchsite.html
http://www.tamaracka.com/search.htm
http://groups.google.com
http://www.prolix.be



Back to top
Derrick Erwee
Guest





PostPosted: Mon Mar 14, 2005 2:20 pm    Post subject: Re: Newbie: TreeView ImageList Reply with quote



Thanks, sorry for posting in the wrong section


"Peter Below (TeamB)" <100113.1101 (AT) compuXXserve (DOT) com> wrote

Quote:
In article <422fde3b (AT) newsgroups (DOT) borland.com>, Derrick Erwee wrote:
I'm using D7, TTreeView, TImageList and Bitmaps(BMP 16x16),
Default parameters for the Treeview and ImageList except the following:
Treeview1.Images := ImageList;
TreeView1.StateImage := nil;

I have a lot of items loaded dynamically onto the treeview and I set
their
Imageindex to the relevant ImageIndex in the ImageList. If a user deletes
an
item, the image should have a little cross over the normal image.
Creating
duplicate images with a cross over is not my style.
So I am trying to use a mask that I put over the image when it is
deleted,
so that I can show a history trail.

After a day of trying with no sucess. I have come to the conclusion that
I
am either stupid, or missing something critical or both.

This is more a question for b.p.d.vcl.components.using.win32 than for
graphics. Anyway: an imagelist allows you to define up to four of its
images
as overlay images. You do that using the imagelists Overlay method. The
overlays get an independent index from 0 to 3. This you can then use for
the
OverlayIndex property of a TTreenode.

So, put an image with your x overlay into the imagelist, call the Overlay
method to define it as overlay #0, then set your nodes Overlayindex to 0.

--
Peter Below (TeamB)
Use the newsgroup archives :
http://www.mers.com/searchsite.html
http://www.tamaracka.com/search.htm
http://groups.google.com
http://www.prolix.be





Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Graphics 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.