Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Formatted Text
Formatted Text [message #447218] Thu, 09 December 2004 17:47
Dave Smith is currently offline Dave SmithFriend
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.
Previous Topic:Using Java 2D API with SWT...
Next Topic:Graphic Context in View
Goto Forum:
  


Current Time: Sat Oct 24 15:10:43 GMT 2020

Powered by FUDForum. Page generated in 0.01873 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top