Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Right-aligned text field on a Mac?
Right-aligned text field on a Mac? [message #448010] Thu, 23 December 2004 19:10 Go to next message
Mark McLaren is currently offline Mark McLarenFriend
Messages: 45
Registered: July 2009
Member
Sorry if this has already been asked (couldn't see a related bug) but is
possible to create right-aligned text field on a Mac? This bit of code
doesn't work for me:

public class TestTextAlignment {
public static void main(String[] args) {
Display display = new Display();
Shell shell = new Shell(display);
Text text = new Text(shell, SWT.RIGHT);
text.setText("hello");
text.setBounds(10, 10, 200, 50);
shell.open();

while (!shell.isDisposed()) {
if (!display.readAndDispatch())
display.sleep();
}
}
}
Re: Right-aligned text field on a Mac? [message #448034 is a reply to message #448010] Mon, 27 December 2004 22:10 Go to previous message
Daniel Spiewak is currently offline Daniel SpiewakFriend
Messages: 263
Registered: July 2009
Senior Member
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<font face="serif">Sounds like a bug to me.  Submit a bug report.<br>
<br>
Daniel<br>
</font><br>
Mark McLaren wrote:
<blockquote cite="midcqf57t$lo0$1@www.eclipse.org" type="cite">Sorry if
this has already been asked (couldn't see a related bug) but is
possible to create right-aligned text field on a Mac?  This bit of code
doesn't work for me:
<br>
<br>
public class TestTextAlignment {
<br>
    public static void main(String[] args) {
<br>
        Display display = new Display();
<br>
        Shell shell = new Shell(display);
<br>
        Text text = new Text(shell, SWT.RIGHT);
<br>
        text.setText("hello");
<br>
        text.setBounds(10, 10, 200, 50);
<br>
        shell.open();
<br>
<br>
        while (!shell.isDisposed()) {
<br>
            if (!display.readAndDispatch())
<br>
                display.sleep();
<br>
        }
<br>
    }
<br>
}
<br>
<br>
<br>
<br>
</blockquote>
</body>
</html>
Previous Topic:FormEditor + Drag and Drop
Next Topic:org.eclipse.swt.browser.ProgressListener problems
Goto Forum:
  


Current Time: Mon Oct 19 22:16:58 GMT 2020

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

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

Back to the top