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
Highlighted
New Developer
Posts: 12
Registered: ‎11-18-2010
My Device: Not Specified

Add context menu actions to TextInput

Hi,

 

I'm trying to add context menu actions to a text input field with no success:

 

var contextMenu:Vector.<ActionBase> = new Vector.<ActionBase>();
contextMenu.push(new Action("Action1", null, null));
contextMenu.push(new Action("Action2", null, null));
                
var actionSet:ActionSet = new ActionSet(contextMenu, "Title", "", null);
                
var actionSets:Vector.<ActionSet> = new Vector.<ActionSet>();
actionSets.push(actionSet);
                
textInput.contextActions = actionSets;

It seems nothing happens and the default context menu associated with the textinput cannot be altered.

Even setting textInput.contextActions to null has no effect.

 

Does anyone know how to replace/add actions to a textinput context menu?

 

Thanks.