Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 313213 - SWT.FULL_SELECTION causes Trees to not have expansion lines
Summary: SWT.FULL_SELECTION causes Trees to not have expansion lines
Status: CLOSED NOT_ECLIPSE
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-17 14:19 EDT by Remy Suen CLA
Modified: 2010-05-17 14:54 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Remy Suen CLA 2010-05-17 14:19:04 EDT
I showed Felipe the problem on my computer. It's a rather odd one.

Display display = new Display();
Shell shell = new Shell(display);
shell.setLayout(new FillLayout());
final Tree tree = new Tree(shell, SWT.SINGLE | SWT.FULL_SELECTION);
for (int i = 0; i < 4; i++) {
  TreeItem iItem = new TreeItem(tree, 0);
  iItem.setText("TreeItem (0) -" + i);
  for (int j = 0; j < 4; j++) {
    TreeItem jItem = new TreeItem(iItem, 0);
    jItem.setText("TreeItem (1) -" + j);
  }
}
shell.setSize(200, 200);
shell.open();
while (!shell.isDisposed()) {
  if (!display.readAndDispatch())
    display.sleep();
}
display.dispose();
Comment 1 Felipe Heidrich CLA 2010-05-17 14:54:08 EDT
Hi Remy, here is why, from MSDN:
http://msdn.microsoft.com/en-us/library/bb760013(v=VS.85).aspx

"TVS_FULLROWSELECT Version 4.71. Enables full-row selection in the tree view. The entire row of the selected item is highlighted, and clicking anywhere on an item's row causes it to be selected. This style cannot be used in conjunction with the TVS_HASLINES style. "

Note: SWT.FULL_SELECTION -> TVS_FULLROWSELECT 
Note: TVS_HASLINES = "Uses lines to show the hierarchy of items."

This is a limitation imposed by win32. Closing as not Eclipse.