Article View: borland.public.jbuilder.java.language
Article #15779SetCaretPosition problem
From: dkbowers
Date: Thu, 29 Apr 1999 00:00
Date: Thu, 29 Apr 1999 00:00
14 lines
1400 bytes
1400 bytes
Hi all, I am extending TextField to add edit masks. I am experiencing a strange problem with setCaretPosition. What I am doing is catching a keytype event and then consuming it. I then insert the requested character into the string containing the edit mask and I set the TextFields text to that string. Then I set the caret position to increment whatever it was before the insert. This works great up until a point. For a telephone mask in this form (999)999-9999 it works until I hit caret position 10. It will not advance the caret past 10. If I set it to eleven it jumps back to 10. Any ideas what can be causing this? TIA, Dave -----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
Technical Details
Message-ID:
<7g8fdl$bv9$1@nnrp1.dejanews.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,9fe892a1296e7475,start X-Google-Attributes: gidf74b3,public From: dkbowers@my-dejanews.com Subject: SetCaretPosition problem Date: 1999/04/29 Message-ID: <7g8fdl$bv9$1@nnrp1.dejanews.com> X-Deja-AN: 472097794 X-Http-Proxy: 1.1 x1.dejanews.com:80 (Squid/1.1.22) for client 206.175.215.111 Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Thu Apr 29 02:16:23 1999 GMT Newsgroups: borland.public.jbuilder.java.language X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 4.01; Windows NT)