Solved

Overlay mask in TTreeView

Posted on 1998-07-13
5
514 Views
Last Modified: 2008-02-01
I'm having trouble with displaying overlay masks in a TreeView.

I'm having a treeview with some items with associated icons in it. I'm trying to use an overlay mask for some of these items by setting the OverlayIndex of the TreeNode to e.g. 1. This doesn't work; the original icon is still displayed.

Does anybody have any suggestions or solutions?? Do I forget something? Any help will be appreciated, especially a working example!

Thanks!
0
Comment
Question by:Arjan092097
  • 2
  • 2
5 Comments
 
LVL 7

Expert Comment

by:BlackMan
ID: 1357767
As far as I remember, there is a bug relating to OverlayIndex. You can only use index 0 as overlay.
0
 

Author Comment

by:Arjan092097
ID: 1357768
With OverlayIndex = 0 it doesn't work either...
0
 
LVL 8

Expert Comment

by:ZifNab
ID: 1357769
Do you do it like this?

You have to call TImageList.Overlay first.
Example:
 
ImageList1.Overlay(Image_Index, Overlay_Index);
                           TreeView1.Items[Item_Index].OverlayIndex := Overlay_Index;

Zif.
0
 

Author Comment

by:Arjan092097
ID: 1357770
Ok, that works!

Thank you Zif! Just answer the question and you'll get the points :)
0
 
LVL 8

Accepted Solution

by:
ZifNab earned 200 total points
ID: 1357771
Hi Arjan,

Here is the answer ;-) :



       You have to call TImageList.Overlay first.
       Example:
         
       ImageList1.Overlay(Image_Index, Overlay_Index);
                                  TreeView1.Items[Item_Index].OverlayIndex := Overlay_Index;

Zif.

0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now