PDA

View Full Version : Modal Window


blmetz
02-02-2004, 02:44 PM
Antun,

I am running lps-2.0.

In the examples section there is a modal window sample:
/lps-2.0p/examples/modeexample.lzx


When I select "Show Modal Dialog" from the sample app, a Modal Winodw Opens, but I still have access to the "Mouse Event Tester" and the "Simple Modal Example" button. (See example code - modeexample.lzx)

Is this correct behavoir? I would assume this buttons would be disabled when the window is open.

Thanks,
Brian

antun
02-04-2004, 02:03 PM
Do you mean to say that you can click the buttons? I can't, although the global mouse event tester shows me what the mouse is doing, but I definitely can't click the buttons.

-Antun

blmetz
02-04-2004, 02:46 PM
Antun,

You are correct. I cannot click the buttons, but the mouse cursor still responds to clickable objects. The cursor changes when it is over a button or a text box giving the user the impression it should work.

Thanks,
Brian

antun
02-04-2004, 02:49 PM
I see what you mean. The only way around that as far as I know is to have one large transparent view that sits on top of everything you don't want to be clickable. Set that to visible (even though it won't be visible to the eye) when you want it to capture all mouse events. The only downside to this is that the cursor will always be a hand cursor.

-Antun

blmetz
02-04-2004, 03:00 PM
Gotcha....

Thanks Antun.

rajubitter
10-21-2005, 10:56 PM
With OpenLaszlo 3.1 there is the possibility to force the system not to show the hand cursor vor clickable elements. This can be achieved by calling LzCursor.showHandCursor(false).

So a view covering the canvas reacting to onmouseover by calling LzCursor.showHandCursor(false) should take care of that problem. This view should be visible only if you open the modal window.


<view id="coverView" x="0" y="0" width="${canvas.width}"
height="${canvas.height}" opacity="0.0" visible="true">

<method event="onmouseover">
<![CDATA[
LzCursor.showHandCursor(false);
]]></method>

<method event="onmouseout">
<![CDATA[
LzCursor.showHandCursor(true);
]]></method>
</view>