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.
TeeTree BeginUpdate/EndUpdate request
-
- Newbie
- Posts: 31
- Joined: Thu Feb 22, 2007 12:00 am
- Location: Nijmegen, Netherlands
- Contact:
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
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
-
- Newbie
- Posts: 31
- Joined: Thu Feb 22, 2007 12:00 am
- Location: Nijmegen, Netherlands
- Contact:
DoDraw overriden
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.
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.
-
- Newbie
- Posts: 31
- Joined: Thu Feb 22, 2007 12:00 am
- Location: Nijmegen, Netherlands
- Contact:
Yes it does
I got things mixed up with TeeChart which doesn't. I humbly apologize.