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
New Developer
iamtheboss1
Posts: 8
Registered: ‎08-22-2008
My Device: Not Specified
Accepted Solution

how to change the size of UI component

Hello,

 

How can I change the size (width and height) of UI component?  For example, I want to set the width of a ListField and add a scroll bar (horizontal). Thanks.

 

Young

Please use plain text.
Administrator
MSohm
Posts: 14,241
Registered: ‎07-09-2008
My Device: BlackBerry Z30, BlackBerry PlayBook
My Carrier: Bell

Re: how to change the size of UI component

The getPreferredWidth and getPreferredHeight methods can be overriden to change the requested dimensions of a field.

 

However, this doesn't mean that a field will support horizontal scrolling with only this change and may vary based on the field.

Mark Sohm
BlackBerry Development Advisor

Please refrain from posting new questions in solved threads.
Problem solved? Click the Accept As Solution button.
Found a bug? Report it using Issue Tracker
Please use plain text.