Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 252413

Summary: alignment doesn't work in Text with MULTI
Product: [Eclipse Project] Platform Reporter: Kevin Barnes <cocoakevin>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: eclipse.felipe, grant_gayed, Silenio_Quarti, skovatch
Version: 3.5Keywords: triaged
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X   
Whiteboard: stalebug

Description Kevin Barnes CLA 2008-10-28 12:15:20 EDT
in control example Text text, change SINGLE to MULTI. Changing LEFT, to CENTER or RIGHT doesn't work.
Comment 1 Kevin Barnes CLA 2008-10-31 12:22:17 EDT
if you turn on WRAP, alignment starts to work again. To disable wrapping we set the NSTextContainer's size to be very big and this seems to be breaking the alignment.
Comment 2 Felipe Heidrich CLA 2008-11-21 13:12:49 EST
StyledText has the same problem (alignment only works when wrap is on).

Having a multi line text with a hscroll and (center/right) alignment doesn't make a lot of sense.

On win32 if alignment != left you get free wrap. should we just do the same here ?
Comment 3 Kevin Barnes CLA 2009-10-26 20:25:06 EDT
Sounds like an acceptable fix. Where is that code in win32 Text?
Comment 4 Felipe Heidrich CLA 2009-10-27 11:30:43 EDT
(In reply to comment #3)
> Sounds like an acceptable fix. Where is that code in win32 Text?

No code in our ends, it happens for free in the OS.
Comment 5 Silenio Quarti CLA 2009-11-02 14:08:21 EST
(In reply to comment #2)
> StyledText has the same problem (alignment only works when wrap is on).
> Having a multi line text with a hscroll and (center/right) alignment doesn't
> make a lot of sense.
> On win32 if alignment != left you get free wrap. should we just do the same
> here ?

Does the style bit SWT.WRAP gets set for free as well? Is H_SCROLL removed?
Comment 6 Felipe Heidrich CLA 2009-11-02 16:02:54 EST
(In reply to comment #5)
> Does the style bit SWT.WRAP gets set for free as well? 
No.
>Is H_SCROLL removed?
No.

as I said, it happens behind the scenes in win32.
Comment 7 Lakshmi P Shanmugam CLA 2017-07-04 07:42:30 EDT
Bug triaged, visit https://wiki.eclipse.org/SWT/Devel/Triage for more
information.
Comment 8 Eclipse Genie CLA 2020-04-23 00:52:21 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.