I've got to admit that I was a little dissapointed when I finially tried out the disclosure triangles in Metroworks' PowerPlant. All the triangles did was to handle the animation when they were clicked upon.
I could do better. What I came up with was a derived view which resized according to the state of the disclosure triangle and resized the owning window the appropriate amount. If you are just going to do a single disclosure, you do not have to write any other code. Just add turndown.cpp and hpp to your project and copy the appropriate resource and you are ready to go.

Unfortunately, doing more than one turndown was a bit more tricky. It requires an derived window to own all of the pull downs and to move the lower pulldowns in the window when a higher pulldown changes state. ie when you have four of them stacked one above the other, and the top one expands, you have to slide the others down in the window. Still not much code, but you will have to do a bit more work.

Known limitations:
This code is provided as is. The author is not responsible even if it starts asking you to play a game and subsequently starts World War III.
<back to Main Page>