Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do text length fit with EditText length?



On Jan 31, 2007, at 10:23 PM, Laurence Harris wrote:

On Jan 31, 2007, at 11:23 PM, Truong Hong Nam wrote:

I need limit size of EditText control. But with fixed character number then text length usually don't fit with EditText length. (shorter or longer).
How do to know When text length fit EditText length then break to input text? Please! some me idea.

To be perfectly honest, I can't really tell what you're asking. Would you mind trying to ask again and explain a little more? Thanks,

My guess (I dare not use the word "assumption") of what he's asking is if there's a way to limit the number of characters that can be entered in a particular EditText control.


If so, he should naturally be using the Unicode EditText control and then read up on the kEventClassTextInput / kEventTextInputUnicodeForKeyEvent Carbon Event (for pre-10.4) or kEventClassTextField / kEventTextShouldChangeInRange (for 10.4 and later). He'll have to do his own length testing in his event handler, but it can be done.

steve

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Carbon-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/carbon-dev/email@hidden

This email sent to email@hidden
References: 
 >How do text length fit with EditText length? (From: Truong Hong Nam <email@hidden>)
 >Re: How do text length fit with EditText length? (From: Laurence Harris <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.