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
vinho
Posts: 28
Registered: ‎08-19-2008
My Device: Not Specified

EditField & Button in one line

May I put an EditField & Button in one line?

I've tried to put them into a HorizontalFieldManager, but I can't see the button!

Please help and thanks.

Developer
rafo
Posts: 507
Registered: ‎07-15-2008
My Device: Not Specified

Re: EditField & Button in one line

Look at this thread
----------------
if your issue solved set "Solution" mark at the relevant post
New Developer
vinho
Posts: 28
Registered: ‎08-19-2008
My Device: Not Specified

Re: EditField & Button in one line

but how can I fix the EditField length?
Developer
rafo
Posts: 507
Registered: ‎07-15-2008
My Device: Not Specified

Re: EditField & Button in one line

[ Edited ]

Check the Blackberry Development Guide chapter about making custom fields.

 

You may download it here

 

You need volume #1, page 51

 

 

Method getPreferredWidth()  is responsible for the field length.


Message Edited by rafo on 09-05-2008 01:55 PM
----------------
if your issue solved set "Solution" mark at the relevant post
BlackBerry Development Advisor
MSohm
Posts: 14,753
Registered: ‎07-09-2008
My Device: BlackBerry Passport

Re: EditField & Button in one line

If you wish to restrict the number of characters in an EditField, you can use this constructor to supply the maximum number of characters that can be entered. 

 

EditField(String label, String initialValue, int maxNumChars, long style)
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