PDA

View Full Version : Cursor changing


epopov
04-13-2004, 08:25 AM
Hi,
I have some problems with cursor. Attached file contains an example.
Sample has a view with width and height of canvas. This view is clickable, so when you move mouse over this view you see "Hand" cursor. When you move mouse over the grey inputtext element cursor became "Line". When you press on "ESC" button, app hides green view that contains grey inputtext but cursor will stay as "Line". Is there any possibility to change cursor to "Hand" in this case?

antun
04-13-2004, 08:59 AM
That's because the view that is clickable is not the one you're turning visibility off for. You probably want:


<canvas width="800" height="600">
<view clickable="true" width="${parent.width}" height="${parent.height}">
<view width="${parent.width-40}" x="20" y="20" bgcolor="green" height="${parent.height-40}">
<inputtext width="${parent.width-10}" bgcolor="0xcccccc" x="5" y="5" />
<method event="onkeydown" reference="LzKeys" args="k">
if(k==27)
this.parent.setVisible(false);
</method>
</view>
</view>
</canvas>


-Antun

epopov
04-13-2004, 11:08 AM
I want cursor to become "Hand" after I perform this.setVisible(false); but it stays "Line" and becomes hand only after I move the mouse.

pablo
04-15-2004, 11:21 AM
Try this:


<method event="onkeydown" reference="LzKeys" args="k">
if (k == 27) {
LzFocus.clearFocus();
LzCursor.unlock();
this.setVisible(false)
}
</method>


pablo