TeeTree BeginUpdate/EndUpdate request

TeeTree VCL for Borland Delphi and C++ Builder.
Post Reply
Hans Hasenack
Newbie
Newbie
Posts: 31
Joined: Thu Feb 22, 2007 12:00 am
Location: Nijmegen, Netherlands
Contact:

TeeTree BeginUpdate/EndUpdate request

Post by Hans Hasenack » Mon Mar 05, 2007 12:30 pm

I implemnted something like this in order to add a lot of nodes before display by changing the DoDraw method to a virtual method.

Could you please change TeeTree.DoDraw to a virtual method
-or-
Add a BeginUpdate/EndUpdate combination for the NodeList or teetree which inhibits (all) drawing until a matching EndUpdate call was made.

If it is already there, please accept my apologies and tell me how to use it. :)

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

Post by tom » Mon Mar 05, 2007 2:20 pm

Hi,

I'm sorry, I'm a bit confused. You tell that you have implemented 'something like this', but it's the first message in this thread. It looks like some part of your message disappeared?

You talk about the request for a begin/endupdate in teeTree. But this is something which already exists in teeTree?

I guess I'm missing something. Could you clarify your request?

Thanks,
tom

Hans Hasenack
Newbie
Newbie
Posts: 31
Joined: Thu Feb 22, 2007 12:00 am
Location: Nijmegen, Netherlands
Contact:

DoDraw overriden

Post by Hans Hasenack » Mon Mar 05, 2007 2:29 pm

1) No it does not exist in TeeTree (yet)
2) I implemented it by making TCustomTree.DoDraw a virtual method
3) In my TeeTree derived class I implemented a DoDraw like this:

procedure TCustomHHDBTree.DoDraw;
begin
// avoid drawing nodes while loading from dataset
// this speeds up execution quite a lot.
if not FLoadingNodes then
inherited;
end;

Which disables drawing as long as FLoadingNodes is True.

(I read Tree nodes from a DB, like this it is about 10x faster)

Though I like the approach with a BeginUpdate/Endupdate better. Thes would heve to be implemented preferably in TCustomTree as public methods.

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

Post by tom » Sun Mar 11, 2007 6:37 pm

TCustomTree already contains public BeginUpdate and EndUpdate methods. It enables/disables the AutoRepaint

Regards,
Tom.

Hans Hasenack
Newbie
Newbie
Posts: 31
Joined: Thu Feb 22, 2007 12:00 am
Location: Nijmegen, Netherlands
Contact:

Yes it does

Post by Hans Hasenack » Mon Mar 12, 2007 7:34 am

I got things mixed up with TeeChart which doesn't. I humbly apologize. :oops:

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

Post by tom » Mon Mar 12, 2007 11:00 am

Ok, but is your problem fixed by using these implementations of BeginUpdate and EndUpdate?

Post Reply