Solved

imagelist

Posted on 2001-07-26
4
372 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
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
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…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

790 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