|
|||||||
|
|
|
![]() |
|
|
Strumenti |
|
|
#1 |
|
Senior Member
Iscritto dal: Dec 2000
Città: bologna
Messaggi: 1309
|
[JAVA + SWT]simulare carriage retur
HO un problema. Ho un text widget e devo fare in modo che quando premo il tasto tab, inserisca un carriage return.
Codice:
if(ev.keyCode == SWT.TAB) {
text.setDataValue(text.getDataValue() + CARRIAG_RETURN);
}
Ho anche provato a creare un evento SWT.CR ma non esegue il ritorno a capo. Nessuno ha qualche idea? |
|
|
|
|
|
#2 |
|
Senior Member
Iscritto dal: Dec 2000
Città: bologna
Messaggi: 1309
|
noteML.getControl().setSelection(Integer.MAX_VALUE);
e ve lo portera all'ultimo carattere :rulez: |
|
|
|
|
| Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 08:16.



















