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: Set max chars for Unicode Edit Text control?



On 7/25/04 4:53 PM, Manfred Schubert didst favor us with:

> How can I set the maximum characters for a Unicode edit text control? I
> can't find it.

That's because you can't. Unfortunately this is not a simple task if you
want to cover all the possibilities. You can install a
kEventTextInputUnicodeForKeyEvent handler to see text being entered into the
control and return noErr if you don't want to accept the text, but that
won't help with pasting. For that I think you'll need to install a
kEventCommandUpdateStatus handler to disable those commands when you don't
want to allow the current text to be pasted. There may be some other issues
I'm not thinking of as well.

Larry
_______________________________________________
carbon-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/carbon-development
Do not post admin requests to the list. They will be ignored.


References: 
 >Set max chars for Unicode Edit Text control? (From: Manfred Schubert <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.