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

Bug 321002

Summary: header image disappears when column is sorted
Product: [Eclipse Project] Platform Reporter: Davy Meers <davymeers>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: eclipse.felipe
Version: 3.5.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Davy Meers CLA 2010-07-27 08:27:26 EDT
Build Identifier: 3.5.2.v3557f

When you click on the header of a treecolumn to sort that column, a triangular image (sort indicator) is shown.

The problem is: when that treecolumn has a header image, the header image disappears when the sort indicator is shown.

As far as i can see, this is because there is only one place reserved for an image in the header of the column. TreeColumn.setImage (Image image, boolean sort, boolean right) is called for both the header image and the sort indicator while (in win32) there is always only 1 org.eclipse.swt.internal.win32.HDITEM.

I guess a possible solution is reserving a separate org.eclipse.swt.internal.win32.HDITEM for the sort indicator, that way we can show both the header image and the sort indicator.

Unfortunately i don't have any experience with adapting SWT, so any suggestion about how i can contribute to fix this issue are welcome.


Reproducible: Always

Steps to Reproduce:
1. Create a tree with treecolumn that has a header image
2. Add a sorter to that treecolumn
3. sort the column, the sort indicator is shown and the header image has disappeared
Comment 1 Felipe Heidrich CLA 2010-07-27 09:23:05 EDT
This is a limitation in Windows. There is no fix for it. Sorry.
Comment 2 Davy Meers CLA 2010-07-27 10:07:30 EDT
Too bad.

Thank you for the quick reply.
Comment 3 Felipe Heidrich CLA 2011-07-26 15:35:42 EDT

*** This bug has been marked as a duplicate of bug 213278 ***