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

Java Development

Reply
Developer
GeekyDad
Posts: 56
Registered: ‎07-15-2008
My Device: Not Specified

How do I get a simple Copy/Paste menu on EditField?

I have searched and searched, and I know it can't be this hard. How can I get a simple Copy/Paste menu when the user clicks the trackball inside an EditField? It's available in all the built-in apps. Also, my EditField is on a screen that extends PopupScreen if that matters.

 

Any ideas?

Please use plain text.
Developer
yosoh
Posts: 213
Registered: ‎07-18-2008
My Device: Not Specified

Re: How do I get a simple Copy/Paste menu on EditField?

[ Edited ]

Hi,

 

The following article describes how to do it to any field:

 

How To - Add Copy, Paste, and other context-specific items to a menu

 

hope it helps,

 

regards,

 

yosoh.

Message Edited by yosoh on 08-14-2008 09:14 AM
--------------------------------------------------
problemSolved() ? kudosPlease():kudosPlease();
Please use plain text.
Developer
GeekyDad
Posts: 56
Registered: ‎07-15-2008
My Device: Not Specified

Re: How do I get a simple Copy/Paste menu on EditField?

Thanks for your help, but it appears a PopupScreen doesn't even have a menu. Is that right? Is this possible even on a PopupScreen? If so, how would you implement it? I've tried lots of stuff such as overriding the makeMenu and other methods, but nothing seems to work. It's like the Menu button is totally disabled on a screen extending PopupScreen.

 

What am I missing?

Please use plain text.
Developer
yosoh
Posts: 213
Registered: ‎07-18-2008
My Device: Not Specified

Re: How do I get a simple Copy/Paste menu on EditField?

Add the following to the constructor of your class which extends the PopupScreen:

 

 

super(//Your Manger here,DEFAULT_MENU);

 

 DEFAULT_MENU will give the menu depending on the field which you add to the PopUpScreen. No need to override the makeMenu as the default EditField menu appears when the field is in focus.

 

--------------------------------------------------
problemSolved() ? kudosPlease():kudosPlease();
Please use plain text.