View Full Version : Is there an on isVisible(true) event?
pschrafl
07-01-2005, 08:42 AM
Hello all,
I just wanted to ask, if there is a event, that get's called, when the visibility is set from false to true? Or is there an other way, that I can fire some events, when the visibility is changed (from true to false or vice-versa)?
Thanks a lot for your answers and all the great help I got here.
Should be an event called onvisible that gets set if you call setAttribute('visible', true | false)
bfagan
07-01-2005, 09:42 AM
What do you need to do in onvisible?
Have you thought of :
subview.setVisible(true);
lzFocus.setFocus(subview);
<subview>
bfagan
07-01-2005, 09:43 AM
*grumble*
<subview>
<method event="onfocus">
...do stuff
</method>
</subview>
pschrafl
07-01-2005, 02:57 PM
@ bfagan:
I'm trying to create an application similar to the dashboard, where the user must login. On successful login, the login window disappears and the other views get displayed to the user. I have also a list of online users, that should fire up some events, so I thought I could use the onVisible event for that.
At the moment, I call all those events using on other event, that gets called, when the user clicks the button and successfully logs in.
e.g.
<method name="doLogin">
canvas.displayHiddenViews();
canvas.getOnlineUsers();
</method>
Perhaps this is the right way to do it, but I'm not sure.
userfriendly
07-01-2005, 09:19 PM
Originally posted by pschrafl
Hello all,
I just wanted to ask, if there is a event, that get's called, when the visibility is set from false to true? Or is there an other way, that I can fire some events, when the visibility is changed (from true to false or vice-versa)?
Thanks a lot for your answers and all the great help I got here.
add something like this to the object which visibility changes:
<method event="onvisible">
if( visible ) {
// do whatever you want
// if the object gets visible
}
else {
// do whatever you want
//if the object gets invisible
}
</method>
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.