Formatted Text [message #447218] |
Thu, 09 December 2004 17:47 |
Dave Smith Messages: 34 Registered: July 2009 |
Member |
|
|
I am trying to code a formatted text field.
My initial pattern is something like
20YY/MM/DD. Now I have to setSelected() for the first Y
because I am replacing it with a number. This works fine
but in my VerifyListener I am trying to set the selection to
be the next Y. It moves the cursor to that position
but does not highlight it and mark that you are replacing the selection
The code in verifyText() looks like ..
if(e.end==e.start)
{
int caret=text.getCaretPosition();
text.setSelection(caret+1,caret+2);
}
I even tried doing the same in ModifyListener but am getting the same
behavoiur. Ideas? I am runing SWT 3.0 on GTK.
|
|
|
Powered by
FUDForum. Page generated in 0.02663 seconds