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

Posts: 14
Registered: ‎06-21-2011
My Device: All device
My Carrier: Mobile App Development

multiple lines in button field

Hello Friends,


I am new to blackberry app development.... can anyone tell me is it possible to show the button field with multiple lines using word wrap....If anyone knows provide me a sample code....






Posts: 2,268
Registered: ‎07-08-2009
My Device: various
My Carrier: various

Re: multiple lines in button field

If you search this forum for "multiline button field", you will find the following (among other things):

Large ButtonField with label that wraps around...

This is a complete self-contained Java class behaving very much like a ButtonField. To make it work properly with touchscreen, add this to the code:

	protected boolean touchEvent(TouchEvent message) {
		if (message.getEvent() == TouchEvent.DOWN) {
			int x = message.getX(1);
			int y = message.getY(1);
			XYRect myArea = new XYRect();
			myArea.setLocation(0, 0);
			if (myArea.contains(x, y)) {
		return super.touchEvent(message);


please click 'Accept Solution' on posts that provide the solution to the question you've posted. Don't say "Thanks", press 'Like' button instead!