Douglas Wagner wrote/ schreef:
> Hello:
>
> Given a window with two sets of controls, one of which is invisible at any
> one time, and a "toggle" button, which switches the visibility of the
> groups. The effect of this is a "two layer" window. Ignore, for the moment,
> any procedural approach to this. Rather, I'm wondering is there an objected
> oriented approach?
>
> [snip]
>
> The ideal solution would have "registered listeners" (like those in Java).
> Can this be done, or simulated in Revolution?
U guess the must utile simulation is this:
1. select all the controls you want to show in the first layer
2. press Ctrl-G (or select 'Group' from the menubar)
3. call your group 'group1'
4. same thing for the other controls, call them 'group2'
5. make a button 'toggle', with the script:
on mouseUp
lock screen -- prevent flickering, and give it a neat look
if the visible of group "group1" then -- if group 1 is visible...
hide group "group1" -- hide it
show group "group2" -- show the other group
else -- otherwise... (do the inverse)
hide group "group2"
show group "group1"
end if
unlock screen -- as a matter of fac, not neccecarily, but, u know...
end mouseUp
I don't know if you were searching for a neater OO solution (guess you
were), but I hope this helps.
> DW
Regards, / Groeten,
Sjoerd