pointing cursor over textarea in lwuit - java-me

How do we set the cursor in TextArea? Mainly the cursor should be visible to the user.
The cursor is visible in the TextField where as it is not visible in the TextArea.How to set the cursor when the TextArea has focus?.

You can't.
LWUIT 1.5 supports a multi-line text field which has a cursor element.

Related

qt4 - change the color of text cursor in a qlineedit?

I've subclassed qlineedit and written a custom line edit which has a default text. The default text is grayed out until the user starts to write some text into it. also the line edit has a time mask input. it only accepts inputs in range of 23:59:59.
the problem is when the line edit is empty and the default text is displayed in gray color, the cursor is also gray. I'd like to know how i'm able to change the cursor color to black while the default text is in gray color.
I have tried to override the paintevent. i saw the source code of qlineedit and saw that the QLineControl::DrawCursor is responsible for drawing the cursor in paintevent. but i have no idea how to change the pen color so it can effect the cursor color. Any ideas on how to do that? tnx.
void QCustomLineEdit::paintEvent(QPaintEvent * pe)
{
QLineEdit::paintEvent(pe);
QPainter painter;
painter.begin(this);
painter.setPen(Qt::red);
painter.end();
}
QLineEdit has a property named placeholderText which you can use to set the grayed text to be displayed when there is no text in the edit box. The cursor color is not changed and when you start typing the placeholder text disappears.

How to animate TextView

I have a custom class extending TextView (I used this trick to set my custom font).
I've a ListView and its elements are represented with my custom TextView.
Sometimes happens that the text is too long to fit and it starts a new line. I want to avoid this, so i set android:singleLine=true in the XML of my element layout.
I want to know if it's possible to animate the TextView of an element of the list, so that if such element is selected, it first scrolls its text to the left, till it reaches the end of the text, then scroll back to the right till the beginning.
I tried with marquee but it looks like it can only move in one direction and it's not what i want.

how to find the cursor position in text service frame work in windows8?

I am implemented sample IME in this service using Notepad and I want to insert text at the cursor's position in the text. How can I get the cursor's position in windows 8?
ItfInsertAtSelection::InsertTextAtSelection inserts text at the selection. Since Notepad isn't TSF-aware, that's the only place you can insert text.

Vertical line alignment when opening new window in vim

How do I keep vertical alignment when opening a new window (split) under current one in vim?
When I edit a file, some lines are visible (say 1-20). Once I open another window the visible lines change to something else (say 5-15). I would like to keep the original window vertically aligned, meaning see lines 1-11 in my example.
The "vertical alignment" changes because Vim is trying to keep the line that your cursor is currently on in view. The simplest way to do what you want is just to press H before you do your split. H moves your cursor to the top line of the window, so when you split the viewport won't have to change to keep your cursor in view.
This will move your cursor of course, but you can just hit `` to return to the mark that was set when you pressed H.

WPF Underline a letter in a label element

I have a label next to a text box which has a short cut key. The XAML for the label looks like:
<Label>Enter your _Name</Label>
Where if you press alt+N it sets focus in the textbox where you would enter your name.
I'd like the letter N to be underlined so that when the user sees the label it looks like:
Enter your Name (well N is bold here, but I'd like it be underlined :))
Thanks for your help!
The N will automatically be underlined when the Alt key is pressed. You'll see this behavior in any Windows application as it's a system-wide setting.
If you want to always get the underline without having to press Alt, go to the Ease of Access center in the control panel and check "underline keyboard shortcuts and access keys".

Resources