RE: Moving the Cursor
- Posted by euphmario at yahoo.com Aug 12, 2002
- 518 views
Yo Yo Yo, Hey to all the people on here that know me. Looks like I finally joined the List. :P To thoes of ya who don't know me, You'll soon get to know me. Anyways, Regarding the Moving the Cursor Problem. I have a easy solution to that. Intercept Key Strokes, and look for the Tab Button to be pushed, or the Enter button to be pushed. Use MoveZOrder to move to the next Control if the Input Key Stroke is VK_RETURN, then use getText(), and setText() to get and format the Phone Number. Easily Done: procedure onKeyDown_PhoneInput(integer id, integer event, sequence param) sequence phone_num if param[1] = VK_TAB or param[1] = VK_RETURN then phone_num = getText(PhoneInput) phone_num = "(" & phone_num[1..3] & ") " & phone_num[4..6] & "-" & phone_num[7..length(phone_num)] if param[1] = VK_RETURN then moveZOrder(nextControl) returnValue(-1) end if end if end procedure setHandler(PhoneInput,w32HKeyDown,routine_id("onKeyDown_PhoneInput")) That's all there is to it. TTFN, (Ta-Ta For Now)