how place a RichTextField and a button in asingle line - blackberry

How can I place a RichTextField and a button in a single line

Place them both in a HorizontalFieldManager.

Related

Let cursor go to new line when tapping return button in UITextView

I have a subclass of UITextView, when I input some text and click on the enter button, the cursor will disappear. I want the result is add a new line and the cursor shows on the begin of the new line.
I found there are same questions on this website, but DOES NOT WORK FOR ME. I hope some one can help. Thanks in advance.

Set cursor position in Edit Text android

How can i set the cursor position in android edit text? Im making a button which would make the cursor one character forward ie. an arrow key like
You can length of the string entered in edit text.
editText.setSelection(editText.getText().length());
You have to use setSelection(int position) method of edittext.
Like edt.setSelection(0)

moving on text of labelfield in blackberry

i have large data in label field and using FOCUSABLE on it makes the whole data selected at once.Scrolling down focus goes to next LabelField.Is ther a way to move on text of LabelField line by line
Eg: my label field is
String tenlines="line
line 2...
line10"
LabelField f= new LabelField(tenlines);
You can use RichTextField
String tenlines="line
line 2...
line10";
RichTextField detailField = new RichTextField(tenlines)

Avoid focus on first screen field in blackberry

I've add some customized buttonfield follow by some label field.
When opening the app, the first buttonfield gets focus, but I don't need the focus when opening the screen. How to avoid the focus on opening the screen?
use NullField like the code below:
NullField field = new NullField();
field.setFocus();
This will avoid the focus on any field in the screen

button with icon and title

in my screen , i want to create/add button with an icon and under this icon i want to write the title of this button
like this picture
Create a custom Field.
For instance, here is an idea of what to do. Your bitmap could alreay contain a label, or to have a String label freely "assignable" to this button you can extend that example (by adding the code to draw the label in paint(Graphics graphics), check the API of Graphics - it is possible to write a text on it).

Resources