Thank you for visiting the BlackBerry Support Community Forums.
BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)
BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.
"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."
- Kevin Michaluk, Founder, CrackBerry.com
Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.
01-19-2011 02:00 PM
Hello friends. I'm trying to create a textfield that automatically scrolls horizontally when the field gets full. I'm using a custom TextField Class shown below which I've reduced for simplicities sake. I've also included the call I'm using. Any ideas why this wouldn't produce a horiztontally scrolling textfield? Thanks everyone much love.
//Creating a new TextField within a HorizontalFieldManager
HorizontalFieldManager mgrFirstName = new HorizontalFieldManager(HORIZONTAL_SCROLL);
TextField FirstName = new TextField(BasicEditField.NO_NEWLINE, HORIZONTAL_SCROLL);
/* Custom TextField Class */
public class TextField extends HorizontalFieldManager
public BasicEditField bEdit = null;
public TextField(long Style, long scroll)
bEdit = new BasicEditField(Style);
Solved! Go to Solution.
01-19-2011 02:21 PM
Here is a link to a knowledge base article which solves this problem. If you want to beautify the gadget, make sure to read the comments:
01-19-2011 03:21 PM
The article shows something else - you need to envelop the field with a Manager with HORIZONTAL_SCROLL in order for it to work. Use the whole gadget (class OneLineTextField) instead of parts of it.
10-16-2011 06:18 AM - edited 10-16-2011 06:20 AM
The horizontal scroll works well no doubt when adding chars. However my problem is that while deleting chars once they have gone beyond the fld size. The chars get deleted till one one char is displayed in the field and then the earlier entered chars start to get displayed.
Expected Behaviour: While deleting chars the cursor shud remain at end of field till the no. of chars are greater than width of the field.
So what could be the solution to this?
10-16-2011 01:46 PM
This is expected. The code, after all, uses BlackBerry standard fields and managers, and a manager does not change its scrolling position unless focus rectangle becomes outside of the current visible region. Your "expected behaviour" is not at all expected - it is the way Windows implements its own scrolling text box, which is not present in the BlackBerry OS.
If you want to design your own field/manager behaving like you've described, start a separate topic and we can ponder some ideas. Posting in a solved thread is almost useless - people mostly skip them thinking that there is nothing more to discuss.