Solved

imagelist

Posted on 2001-07-26
4
368 Views
Last Modified: 2008-02-01
I am trying to set the images  property for fcDBTreeview at run time. I have
two
different image list that I use depending upon the node level. These
properties are set in the
an oncalcnodes event.  When I run this code wierd things happen: You can not
navigate the tree.The
queries do not run. Should I set this property else where in the code
besides the oncal procedure? Or do I need to set additional properties?
Please advise.
procedure TForm1.fcDBTreeView1CalcNodeAttributes(
  TreeView: TfcDBCustomTreeView; Node: TfcDBTreeNode);
begin

        if node.level = 0
             fcDBTreeView1.Images := imagelist1;
       else
      if node.level = 1
           fcDBTreeView1.Images := imagelist2;
     end;


0
Comment
Question by:khbryant
4 Comments
 

Accepted Solution

by:
meirchen earned 100 total points
Comment Utility
If you place the images in the same imagelist, it will possible to select the imageindex.  I don't know if it is possible to use seperate lists
0
 
LVL 4

Expert Comment

by:fva
Comment Utility
First of all, you might want to go in CommunitySupport topic and request that your other question to be deleted and your points returned. It's a duplicate. Alternatively you can delete it yourself, but it's a little dirtier.

About your question:
meirchen seems right, you should use one single image list.
The cause is probably in the implementation of the treeview control, which is merely a wrapper over Windows's standard control. The handler you quoted gets probably called as response to a callback from Windows itself, and at that time it might be not possible to change the image list (operation that is still a WinAPI tree control message itself).

Just my opinion,
F.
0
 
LVL 26

Expert Comment

by:Russell Libby
Comment Utility
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Accept meirchen's comment as answer

Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
Thank you,
Russell

EE Cleanup Volunteer
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

762 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

9 Experts available now in Live!

Get 1:1 Help Now