-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi
Following zul code shows two simple labels. The first label is created with a label tag in the zul page. The second label is created in zscript. Both labels have a popup which should appear automatically when the mouse moves over the label.
For the first label it works perfectly. But not for the second label which is created in zscript. The popup does not appear when the mouse moves over the label. However, the popup appears with a click on the mouse.
Here the zul code:
<zk> <window id="theWindow" border="none"> <label value="Label 1 with popup1" tooltip="popup1"/> <separator orient="horizontal" /> <popup id="popup1"> <label value="Hello, I am popup 1" /> </popup> <zscript> import org.zkoss.zul; Label l2 = new Label("Label 2 with popup2"); theWindow.appendChild(l2); Popup popup2 = new Popup(); popup2.appendChild(new Label("Hello, I am popup2")); popup2.setParent(theWindow); l2.setPopup(popup2); </zscript> </window> </zk>
Is there a workaround for this behaviour?
Thank you
Regards
Dieter
Hello , the popup shows up when you click , and the tooltip shows up when your mouse over ,
May be you could try this ?
l2.setTooltip(popup2);
I try the both on zk user guide , it work fine. :D
Asked: 2010-09-16 05:12:20 +0800
Seen: 190 times
Last updated: Sep 19 '10