Thankyou, just what I needed.
Is it possible to detect if the user clicked the +/- to expand/contract a group? I want to be able to expand/contract the group when the user clicks anywhere on the line not just the +/-. By implementing the code above I can do that, but when the +/- is clicked the group expands then immediately contracts - presumably because the control is expanding then the code immediately contracts.