-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hello,
I need to open a Bandbox by default but if it doesn't work with this code (Java):
Bandbox bbTestbox = new Bandbox(); bbTestbox.setOpen(true); bbTestbox.setParent(window);
What would be the correct approach to do that?
Thanks in advance
mw88,
I suspect the reason it doesn't open is because you haven't defined any children. To test the theory, change your first line to something like:
Bandbox bbTestbox = new Bandbox("xxx");
Also, if you decide to build your bandbox in ZUL, you can make the bandbox open automatically by doing the following:
<bandbox id="bd" mold="rounded" onCreate="self.setOpen(true)">
Hope that helps.
Todd
Hmmmm, interesting. I played a little bit for the needed case without success. I have tried the way with a manually sended onOpen event.
Seems like the documentation said, the onOpen event is called AFTER the user clicks manually on it.
Supported events
Name Event Type onOpen Event: OpenEvent Denotes user has opened or closed a component. Note: unlike onClose, this event is only a notification. The client sends this event after opening or closing the component.
best
Stephan
Thank you both for your answers.
I noticed that I had to initialize my Window in Order to get this working.
After initializing I placed the command bbTestbox.setOpen(true).
Now its working ;-)
Asked: 2010-08-19 04:06:37 +0800
Seen: 315 times
Last updated: Aug 23 '10