Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-swt-dev] SWT Text class -Pocket PC Bug

Hi,

(Apologizes if this email appears twice, but l forgot to subscribe
before l sent my first email).

I noticed a bug when using the Text class under the Pocket PC OS.
Whenever l create an instance of the Text class, and set the text 
(using the setText() method), the last character is missing. This
occurs when I'm using SWT (RC3 build) with J9 under the Pocket PC 
OS. For instance if l set the text to 'ABCDEFGH', the 'H' character
is not shown in the Text box.

Here's a sample piece of code that demonstrates this. Also when l
try this code under W2K (RC3 build), it works (ie. shows all the
characters).

......
Display display = new Display ();
Shell shell = new Shell (display);
shell.setLayout(new GridLayout());

Text txt = new Text(shell, SWT.SINGLE | SWT.BORDER);
txt.setText("ABCDEFGH");

shell.open ();

while (!shell.isDisposed ()) {
if (!display.readAndDispatch ()) display.sleep ();
}
display.dispose ();
......

cheers,

Patrik




Back to the top