PDA

View Full Version : Missing Action: SetFocus to Page


SonG0han
01-25-2008, 07:26 AM
I noticed that there seems to be no option to set the focus to the page to make the OnKey Event available. I have a OnKey event on the page but it does not work if you have your cursor inside an input object or a listbox. To enable the page OnKey Event you have to set focus to the page but there is no action for it? (just for all other objects with the OnFocus event).

Darryl
01-25-2008, 10:31 AM
Thanks for the suggestion.

REF: 17165

holtgrewe
01-25-2008, 07:31 PM
If you need a quick work-around, I was able to place a hotspot over the page (Arrange:Send it to Back).

Hotspot --> on click: Page.SetFocus("");

This returns Focus to the Page. This will enable the Page OnKey events.

hth

SonG0han
01-26-2008, 04:36 AM
Thank you, I will try this. :)
Right now I use a small input object with just a few pixels in size that has the onKey event and it gets the focus if you click the button.

(I have a button that starts the page timer which sets the position of an image object to the cursor position and if you hit ESC the timer stops and the image stays at the new positon - Drag & Drop :) )