-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3447264
By: nobody
Why does the checkbox not act the same as the button for attaching the event?
I am using onCheck for checkbox, but it does not do anything. Is this a bug?
<window id="myWindow" title="more event listener demo" border="normal">
<label id="myLabel" value="Hello, World!"/>
<button id="myButton" label="Change label"/>
<checkbox id="myCheckbox" label="Change label"/>
<script>
private class ClickEventListener implements EventListener {
public boolean isAsap() {
return true;
}
public void onEvent(Event event) throws UiException {
if (event instanceof MouseEvent) {
event.target.getFellow("myLabel").setValue("Hello, Event!");
}
}
}
myCheckbox.addEventListener("onCheck", new ClickEventListener());
myButton.addEventListener("onClick", new ClickEventListener());
</script>
</window>
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3447346
By: nobody
No that is not the case anymore. All of a sudden, my checkboxes started to respond to onCheck. It worked in FF and IE.
By the way, I noticed that if a window is set invisible, and a doOverlapped() is called on it, it makes the window visible. Is this intended?
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3447366
By: nobody
Yes, doOverlapped, doModal and doEmbeded will cause it visible.
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3449134
By: nobody
Ok there is indeed a problem with checkbox. The problem is this. The onCheck event is raised only if clicked on the checkbox itself and not on the label.
For example, if I have:
[X] Label
Clicking on the [X] produces the onCheck event, but not on the Label, but clicking on Label does make the [X] toggle. I think this is a very simple bug and can be fixed by propagating the event handler to the label. Hope this bug get fixed soon!
Asked: 2005-11-28 11:32:39 +0800
Seen: 1,276 times
Last updated: Nov 29 '05