[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.platform.swt] Re: SWT widget borders not rendered correctly
|
This sounds like a difference between the old and new themes on XP, see
http://www.eclipse.org/swt/faq.php#xpthemes . The surprising part is that
you see this difference with swt 3.2.2, because this version should always
pick up the new XP theme (the flat blue line border). Is it possible that
the machines that you see the 3D border on are set in the Windows settings
to explicitly use the old theme? Do you still see this behaviour difference
with a recent swt/eclipse build such as
http://download.eclipse.org/eclipse/downloads/drops/I20080330-1350/index.php
?
Grant
"bonzai" <tbenzaia@xxxxxxxxx> wrote in message
news:0370f3878b51d0648c9ecd45bd4091c4$1@xxxxxxxxxxxxxxxxxx
> I have a problem with SWT widgets not rendering as 3D on some WinXP
> machines. The same code will appear with 3D borders on some machines,
> while on others it will appear as a single pixel wide, blue line around
> the widget. All machines are running XP SP2. I am using SWT 3.2.2.
>
> For instance, the following code looks different depending on the machine.
> What could be causing this?
>
> import org.eclipse.swt.graphics.Point;
> import org.eclipse.swt.graphics.Rectangle;
> import org.eclipse.swt.widgets.Shell;
>
> import org.eclipse.swt.SWT;
> import org.eclipse.swt.widgets.Display;
> import org.eclipse.swt.widgets.Text;
>
> public class FlatBorderText {
> public static void main(String[] args) {
> Display display = new Display();
> Shell shell = new Shell(display, SWT.BORDER |SWT.CLOSE);
> shell.setSize(new Point(140, 100));
> shell.setLayout(null);
> Text textBox = new Text(shell, SWT.BORDER);
> textBox.setBounds(new Rectangle(10, 10, 115, 19));
> textBox.setText("Head for the border!");
> shell.open();
> while (!shell.isDisposed()) {
> if (!display.readAndDispatch())
> display.sleep();
> }
> display.dispose();
> }
> }
>
>