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
ChappyK
Posts: 75
Registered: ‎09-13-2011
My Device: Playbook
My Carrier: None
Accepted Solution

Hidden text fields still selectable ???

I have a couple popup screens in my app that have TextFields. They are setup to appear in the center of the screen when a user requests it, the problem is that while the group view is hidden and the textfields arent visible on screen the user can still give that textfield focus. This happens with Flex SDK 4.6.0, Air SDK 3.0.0. Original app was developed in Flex SDK 4.5.1 and Air SDK 2.0.0 and at no point did I see this kind of behaviour. Has anyone experienced this before? and are there any suggestions or fixes for this, looking for something simple and quick. Thanks!!!



Show your support and click on the like button when you see a post that was helpful.
Please use plain text.
BlackBerry Development Advisor (Retired)
dmalik
Posts: 427
Registered: ‎02-22-2012
My Device: BlackBerry Z10, BlackBerry Dev Alpha C, BlackBerry PlayBook
My Carrier: Bell

Re: Hidden text fields still selectable ???

How are you hiding your TextFields? Are you able to provide any code to demonstrate this? Are you doing a removeChild()?

 

Regards,
Dustin

Follow me on Twitter: @dustinmalik
-----------------------------------------------------------------------------------------------------
Keep up to date on BlackBerry development: http://devblog.blackberry.com/
Please use plain text.
Developer
ChappyK
Posts: 75
Registered: ‎09-13-2011
My Device: Playbook
My Carrier: None

Re: Hidden text fields still selectable ???

The TextField is in a group, I set visibility to false to hide the group.



Show your support and click on the like button when you see a post that was helpful.
Please use plain text.
BlackBerry Development Advisor (Retired)
dmalik
Posts: 427
Registered: ‎02-22-2012
My Device: BlackBerry Z10, BlackBerry Dev Alpha C, BlackBerry PlayBook
My Carrier: Bell

Re: Hidden text fields still selectable ???

Instead of setting visibility have you tried add/remove child?

Follow me on Twitter: @dustinmalik
-----------------------------------------------------------------------------------------------------
Keep up to date on BlackBerry development: http://devblog.blackberry.com/
Please use plain text.
Developer
ChappyK
Posts: 75
Registered: ‎09-13-2011
My Device: Playbook
My Carrier: None

Re: Hidden text fields still selectable ???

I havent tried it but it does seem like the only solution.



Show your support and click on the like button when you see a post that was helpful.
Please use plain text.
Contributor
Confession1996
Posts: 40
Registered: ‎07-31-2011
My Device: Playbook
My Carrier: n/a

Re: Hidden text fields still selectable ???

If I understand what you're trying to do, I might suggest changing the type of textfield it is in code at whatever point you need it to not be focused on using the following: instanceName.type =TextFieldType.INPUT;

 

Replacing 'INPUT' with whatever type you need to change it to. And reverting it back at whichever point you need it to be an input textfield again. instanceName.mouseEnabled = false; may also do the trick, but since its an input field, it may not.

 

Havent tested these - just thinking off the top of my head. Hope this helps.

Please use plain text.