Hi Pieter,
I've noticed that if I use Node.Expand to expand a node, OnAfterExpandNode is not called. Is this by design, or would you expect it to be called?
I use OnAfterExpandNode to make a call to some column sizing code, which works perfectly if I expand using the [+] icon, but doesn't if I expand some nodes in code (to make other nodes visible)
If it's by design, I will have to put an explicit call to OnAfterExpand whenever i use Node.Expand.
Thinking about this further, I can see that it probably is by design!
And my column sizing code wouldnt work anyway, because, if I'm right, AutoSizeColumn doesn't work within a BeginUpdate/EndUpdate block, and when I'm expanding nodes in code I do that within BeginUpdate/EndUpdate.
I'll add a call to my column sizing code manually!
Dear Mr. Collins,
This is by design. The OnAfterExpandNode will not be called when programmatically expanding a node. After expanding a node, you already know its expanded, you will need to create a separate autosizing routine that updates the treeview, that can be called manually and in the appropriate events.
Kind Regards,
Pieter