Page 1 of 1

TeeTree BeginUpdate/EndUpdate request

Posted: Mon Mar 05, 2007 12:30 pm
by 9349350
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. :)

Posted: Mon Mar 05, 2007 2:20 pm
by Tom
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

DoDraw overriden

Posted: Mon Mar 05, 2007 2:29 pm
by 9349350
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.

Posted: Sun Mar 11, 2007 6:37 pm
by Tom
TCustomTree already contains public BeginUpdate and EndUpdate methods. It enables/disables the AutoRepaint

Regards,
Tom.

Yes it does

Posted: Mon Mar 12, 2007 7:34 am
by 9349350
I got things mixed up with TeeChart which doesn't. I humbly apologize. :oops:

Posted: Mon Mar 12, 2007 11:00 am
by Tom
Ok, but is your problem fixed by using these implementations of BeginUpdate and EndUpdate?