Summary: | [Win32] Multi line Text field (SWT.MULTI) does not support Text.setMessage | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] Platform | Reporter: | Henno Vermeulen <strider80> | ||||||||||
Component: | SWT | Assignee: | Platform-SWT-Inbox <platform-swt-inbox> | ||||||||||
Status: | NEW --- | QA Contact: | |||||||||||
Severity: | normal | ||||||||||||
Priority: | P3 | CC: | marcus, markus.kell.r, rajendrakumar, strider80, twolf, wim.jongman | ||||||||||
Version: | 3.7 | ||||||||||||
Target Milestone: | --- | ||||||||||||
Hardware: | PC | ||||||||||||
OS: | Windows 7 | ||||||||||||
Whiteboard: | |||||||||||||
Bug Depends on: | |||||||||||||
Bug Blocks: | 569160 | ||||||||||||
Attachments: |
|
Description
Henno Vermeulen
2010-10-27 10:27:20 EDT
Created attachment 276951 [details]
Snippet showing this.
Created attachment 276952 [details]
FloatingText Widget
This is a composite that does show the message on SWT.MULTI in some situations.
Created attachment 276953 [details]
Snippet for the FloatingText composite
When using this Snippet that uses the FloatingText composite which is also attached you can see that SWT.MULTI does show a message in some situations.
Created attachment 276954 [details]
Demonstration of SWT.MULTI showing in FloatingText
In this movie, you can see that the middle widget does not show a message but the bottom widget does and they are both SWT.MULTI.
The difference in behavior in the FloatingTextSnippet is caused by a bug in FloatingText in line 113 in the attachment: SWT.SEPARATOR == SWT.MULTI. (See also [1].) The bottom "multi" field is not a multi-line field; it's a single line field that just grabs the remaining space. Try entering a second line there :-) The middle one is a multi-line field. FloatingText by mistake removes the SWT.MULTI when it clears the SWT.SEPARATOR flag, but Text re-adds SWT.MULTI because SWT.WRAP is set. The original report from comment 0 is still correct, though: setMessage() works only for single-line fields (I checked only OS X). However, at least on Cocoa, the implementation class for mutli-line text fields, NSTextView, does not have that concept. It would need to be emulated, but that'd be departing from the SWT concept of being as close as possible to native widgets. [1] https://git.eclipse.org/r/c/platform/eclipse.platform.ui/+/172920/4/bundles/org.eclipse.jface.widgets/src/org/eclipse/jface/widgets/floatingtext/FloatingText.java#126 |