chamenas Wizard
Joined: 26 Mar 2008 Posts: 1547
|
Posted: Sat Jan 22, 2011 8:47 pm |
#Button
As far as making it so that it opens and closes in alternation, the easiest method is to simply make a tracking variable which, when you click the button is set to, say, 1, and when you click it again check to see if it's set to 1, then set it back to 0. What you end up with is a very common "toggle" if statement:
Code: |
#IF (@isFolderOpen) {
isFolderOpen = 0
// Stuff to close folder here
} {
isFolderOpen = 1
// Stuff to open folder here
}
|
|
|