Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » How do I right align ccombo text?
How do I right align ccombo text? [message #1122898] Tue, 01 October 2013 22:23 Go to next message
Nigel Daniels is currently offline Nigel Daniels
Messages: 9
Registered: May 2011
Junior Member
Hi,

I would like the text in my ccombo box appear right aligned. I cannot
set SWT.RIGHT when I create it nor do I see any methods that would let
me right align the content. Any suggestions are welcome.

Thanks , Nigel
Re: How do I right align ccombo text? [message #1131323 is a reply to message #1122898] Thu, 10 October 2013 08:18 Go to previous messageGo to next message
Arun Thondapu is currently offline Arun Thondapu
Messages: 11
Registered: April 2011
Junior Member
You are right you cannot use SWT.RIGHT with CCombo but you can try using the orientation flag SWT.RIGHT_TO_LEFT while creating the CCombo. I'm not sure if it is exactly what you're looking for, it seems to right align the text in the drop-down list (but not in the combo's text box itself).
Re: How do I right align ccombo text? [message #1137694 is a reply to message #1131323] Mon, 14 October 2013 13:20 Go to previous message
Nigel Daniels is currently offline Nigel Daniels
Messages: 9
Registered: May 2011
Junior Member
On 10/10/2013 05:18, Arun Thondapu wrote:
> You are right you cannot use SWT.RIGHT with CCombo but you can try using
> the orientation flag SWT.RIGHT_TO_LEFT while creating the CCombo. I'm
> not sure if it is exactly what you're looking for, it seems to right
> align the text in the drop-down list (but not in the combo's text box
> itself).

Hi Arun, thanks for getting back to me. I had looked at
SWT.RIGHT_TO_LEFT but figured that was more applicable to supporting
bidi text, not exactly what I was looking for. I found that if the text
is numeric the CCombo should right align but I was wanting to display
values with a % sign. This causes the CCombo to left align as text.
Sadly I've still not found a solution to this SWT quirk.
Previous Topic:TreeViewer: getText before treeExpanded
Next Topic:Error popup msg with SWTError
Goto Forum:
  


Current Time: Sun Apr 20 12:19:33 EDT 2014

Powered by FUDForum. Page generated in 0.05989 seconds