Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

imagelist

Posted on 2001-07-26
4
Medium Priority
?
383 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 400 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

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…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
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.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

664 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