Poss Ttree image index bug

TeeTree VCL for Borland Delphi and C++ Builder.
Post Reply
Cyionics
Newbie
Newbie
Posts: 17
Joined: Thu Mar 11, 2004 5:00 am
Location: UK
Contact:

Poss Ttree image index bug

Post by Cyionics » Sun Jan 30, 2005 9:48 pm

Hi

I had to change the source code of teetree by dding the line shown below,
because when I assign a image index to a tree node, the image is correctly assigned but the image index itself never
changes and I need to know the image index later so I made a small change in
their code (added line 6788).

Rgds

Peter

procedure TTreeNodeShape.SetImageListIndex(const Value:Integer);
begin
if FImageListIndex<>Value then
begin
FImageListIndex:=Value; // just set the variable. Do not free FImage.
FreeAndNil(FImage); //tom:01/09/2002 Otherwise Images are drawn on top of each other...
RecalcImageSize;
// line 6788 added
FImageListIndex:=Value; // the above line resets the ImageListIndex (!)

CanvasChanged(Self);
end;
end;

tom
Advanced
Posts: 211
Joined: Mon Dec 01, 2003 5:00 am
Contact:

Post by tom » Wed Mar 09, 2005 2:13 pm

thanks for the bug report, we will look at it and take it into account in one of the next releases

Maelstromware
Newbie
Newbie
Posts: 3
Joined: Sun Mar 09, 2003 5:00 am
Contact:

ImageListIndex does not update

Post by Maelstromware » Mon Mar 14, 2005 6:09 pm

I had a similar problem, but I've recompiled the source and my code now works like a charm. Thank you Peter for posting this kind advice.

Cyionics
Newbie
Newbie
Posts: 2
Joined: Wed Oct 06, 2010 12:00 am

Re: Poss Ttree image index bug

Post by Cyionics » Wed Oct 06, 2010 4:34 pm

The latest version still has this problem.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: Poss Ttree image index bug

Post by Narcís » Fri Oct 08, 2010 11:40 am

Hi Cyionics,

I'd like to apologise for the lack of response here. Could you please attach a simple example project we can run "as-is" with which we can reproduce the problem here and we will investigate it and try to apply the fix you suggested?

Thanks again for your collaboration.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Cyionics
Newbie
Newbie
Posts: 2
Joined: Wed Oct 06, 2010 12:00 am

Re: Poss Ttree image index bug

Post by Cyionics » Wed Oct 13, 2010 3:06 pm

Here is a program that creates two tree nodes and assigns 0 and 1 to their ImageListIndex properties, respectively, in the form's OnCreate. When you click the button it reads the ImageListIndex property of the first node, and it returns -1 even though the image is correctly set.

TTreeNodeShape.SetImageListIndex calls RecalcImageSize and that procedure (by calling some other procedures) causes the FImageListIndex variable to be reset to -1.
Attachments
SetImageListIndex.zip
(2.17 KiB) Downloaded 1482 times

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Re: Poss Ttree image index bug

Post by Narcís » Thu Oct 14, 2010 10:41 am

Hi Cyionics,

Thank you very much for your project. I have checked your solution proposal solves the issue. We will investigate a little bit further and consider it for inclusion in the next maintenance release.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply