Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10
Accepted Solution

TextInput leftIcon event trapping

Has anyone fully implemented the left icon in the TextInput control?  I am able to set a raw icon and a UIComponent and the control adjusts to it for the most part (seems to be an issue when the left icon is set and you have prompt defined).  However, when I add an addEventListener( MouseEvent.CLICK, MyCallback) to the added DisplayObject, the event does not get triggered when the item is selected.

Please use plain text.
Developer
JRab
Posts: 2,462
Registered: ‎11-04-2010
My Device: Bold 9700

Re: TextInput leftIcon event trapping

hey john,

 

in regards to the lack of event dispatching from the UIComponent, from the looks of the ASDocs the UIComponent class doesnt implement any sort of the EventDispatcher classes (flash.events.IEventDispatcher). A class needs to itself implement or have a class that it extends or implements, implement the EventDispatcher class in order to be able to dispatch events such as MouseEvent.CLICK.

 

ill look into the icon text input though and see what i can come up with. hope that helps somewhat!

J. Rab (Blog) (Twitter)
--
1. If you liked my post or found it useful please click on the thumbs up and provide a Like!
2. If my post solved your problem please click on the Accept as Solution button. Much appreciated!

Approved Apps: OnTrack | ssShots | Hangman
Please use plain text.
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10

Re: TextInput leftIcon event trapping

Drawback in working in Flex for so many years.  the UIComponent in MX does dispatch events. I'll try a Sprite to see if that will do it (should).

 

Thanks for the lead.

Please use plain text.
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10

Re: TextInput leftIcon event trapping

[ Edited ]

A QNX Button worked fine.  Seems a little small to get a finger on it.  It gets automatically sized by the control's getLeftIconRectThis should be able to be defined by the developer.  They leave a good 10px on top and bottom that would make it easier to touch with a finger.

Please use plain text.
Developer
gluth
Posts: 192
Registered: ‎09-23-2009
My Device: 9860/PlayBook/Dev Alpha
My Carrier: Plus GSM

Re: TextInput leftIcon event trapping

I have made small tuto about TextInput icons, you may want to see it here:

http://supportforums.blackberry.com/t5/Tablet-OS-SDK-for-Adobe-AIR/ActivityIndicator-amp-TextInput-i...

Found my post helpfull? Like it! It solves your trouble? Help others and accept it as solution. Search before asking.
My apps: Secret Cod3s | Should my tablet be banned?
--
Jakub Nietrzeba
PGS Software S.A.
Your reliable partner in Poland - IT Outsourcing - BlackBerry, iPhone, Web and Standalone applications
Please use plain text.
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10

Re: TextInput leftIcon event trapping

Thanks.  That is a very interesting use of the icons.

Please use plain text.