 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Derrick Erwee Guest
|
Posted: Wed Mar 09, 2005 5:43 pm Post subject: Newbie: TreeView ImageList |
|
|
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
|
Posted: Thu Mar 10, 2005 7:36 pm Post subject: Re: Newbie: TreeView ImageList |
|
|
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
|
Posted: Mon Mar 14, 2005 2:20 pm Post subject: Re: Newbie: TreeView ImageList |
|
|
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 |
|
 |
|
|
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
|
|