[Lazarus] TTreeview fires lots and lots of events

Mattias Gaertner nc-gaertnma at netcologne.de
Tue Oct 25 16:35:06 CEST 2011


On Tue, 25 Oct 2011 16:23:36 +0200
Graeme Geldenhuys <graemeg.lists at gmail.com> wrote:

> Hi,
> 
> The TTreeview seems to fire a lot of events which doesn't seem right.
> Attached are two images showing what I did.
> 
> treeview_form_gets_focus.png
>    Here the form containing the treeview simply got focus. Note all the events
>    that fired - as shown in the debug server.
> 
> treeview_select_node_changed.png
>   Here I simply selected a different tree node. Again, note all the events that
>   fired due to that action - all events inside the red rectangle.
> 
> Is this normal?

Yes.
The selection triggers a paint, which paints every visible node, which
triggers one OnGetImageIndex for each node.

Mattias




More information about the Lazarus mailing list