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

Bug 337985

Summary: First Tree column does not redraw upon resize
Product: [Eclipse Project] Platform Reporter: Manuel Steurer <manuel.steurer>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: minor    
Priority: P3    
Version: 3.6.1   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: stalebug
Attachments:
Description Flags
Snippet displaying the problem none

Description Manuel Steurer CLA 2011-02-23 10:38:37 EST
Created attachment 189606 [details]
Snippet displaying the problem

I've modified the SWT Snippet 230 to use a Tree instead of a Table and
also mixed in the custom drawing logic from Jface Snippet 51 to draw an image
in the center of each column, see attached snippet. When you resize a
column the Images move along with it in all columns but the first.
Once you "dip" the window outside the screen and get it back it is
correctly painted.

The problem does not exist on Linux, and also not when using a Table
instead of a Tree.

Grant Gayed suggested this workaround in the SWT newsgroup:
/* work around swt bug... */
if (SWT.getPlatform().equals("win32")) {
   tree.getColumn(0).addListener(SWT.Resize, new Listener() {
       public void handleEvent(Event event) {
           tree.getDisplay().asyncExec(new Runnable() {
               public void run() {
                   if (tree.isDisposed()) return;
                  /* assumes logical column 0 is also first physical column */
                  tree.redraw(0, 0, tree.getColumn(0).getWidth(), tree.getBounds().height, true);
               }
           });
       }
   });
}
Comment 1 Lars Vogel CLA 2019-09-24 13:58:49 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.

If you have further information on the current state of the bug, please add it. 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.
Comment 2 Manuel Steurer CLA 2019-09-25 02:16:31 EDT
The problem still occurrs for current SWT versions.
Just tried the workaround from comment 1 which kinda fixes the problem, although the icons in column 1 don't move as smooth as in the other columns.
But this problem is not of much importance overall I guess.
Comment 3 Eclipse Genie CLA 2021-12-13 09:57:41 EST
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.