Solved

imagelist

Posted on 2001-07-26
4
380 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 

Accepted Solution

by:
meirchen earned 100 total points
ID: 6322439
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
ID: 6322640
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
ID: 8733834
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
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 video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

691 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