Bug 438479 - DragSource: if tree is ownerdraw/full-selection, strange gray area is shown on mouse-down
Summary: DragSource: if tree is ownerdraw/full-selection, strange gray area is shown o...
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.4   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-29 05:43 EDT by Thomas Singer CLA
Modified: 2020-03-16 07:59 EDT (History)
2 users (show)

See Also:


Attachments
Sample to reproduce (2.24 KB, text/plain)
2014-06-29 05:43 EDT, Thomas Singer CLA
no flags Details
Screenshot (6.65 KB, image/png)
2014-06-29 05:44 EDT, Thomas Singer CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Singer CLA 2014-06-29 05:43:13 EDT
See also bug 438478:

Please launch the attached snippet, put the focus in the right text field. Then click-and-hold the left mouse button on a unselected tree node. It will show strange gray area.
Comment 1 Thomas Singer CLA 2014-06-29 05:43:31 EDT
Created attachment 244647 [details]
Sample to reproduce
Comment 2 Thomas Singer CLA 2014-06-29 05:44:02 EDT
Created attachment 244648 [details]
Screenshot
Comment 3 Thomas Singer CLA 2014-06-29 05:47:23 EDT
This seems to be related to the tree item's text (though when using owner-draw, this should not be used): change

  TreeItem iItem = new TreeItem(tree, 0);
  iItem.setData("TreeItem (0) -" + i);

to

  TreeItem iItem = new TreeItem(tree, 0);
  iItem.setText("hello world");
  iItem.setData("TreeItem (0) -" + i);

and the gray area will be much wider.
Comment 4 Thomas Singer CLA 2014-06-29 06:07:36 EDT
The work-around is to not use the SWT.FULL_SELECTION flag. :(
Comment 5 Thomas Singer CLA 2020-03-16 07:59:52 EDT
I can't reproduce this problem any more.