Log in

View Full Version : Remembering the state of window lists in modules.



Tenian
August 18th, 2008, 18:06
In 4E_JPG several lists (monsters, powers, etc) are composed of nested lists.

The fighter powers for example break the powers into level/action type (Fighter Level 1 At-Will Exploits) each of which has a list of powers under them (Cleave, Tide of Iron, etc).

It's possible to double click on the top level list (Fighter level 1 At-Will Exploits) and the powers underneath it are hidden.

I know it's possible to make the lists start in either the all expanded or all closed state.

What I'd like to do is have it remember the state I left the list in upon closing the window. Is this possible? Or (dare to dream) already implemented and I just need to set something?

Moon Wizard
August 18th, 2008, 20:21
I would think you would have to implement your own code to track the expanded/collapsed status.

You would need to have an onClose handler which saved off the status of each node collapsed, probably in the campaign registry. Then, in the onInit handler, you would need to parse your status data that you saved off on the last close, and collapse the appropriate nodes.

Cheers,
JPG