|SWT/Windows Paint Issue [message #799261]
||Wed, 15 February 2012 17:09
| Christian Sell
Registered: August 2010
I have a strange paint issue which is bugging me (literally). This is happening not very often, but often enough for our customer to turn nasty:
Under certain circumstances, which are not totally clear, a Composite gets into a state where dragging the scroll bar thumb will cause a large area along the scrollbar to be erased. The area that gets erased (painted white) is about 5 x as wide as the scroll bar.
Heres one scenario we have boiled down that reproduces the issue: I have one composite with H_SCROLL | V_SCROLL and FillLayout, and another Composite with CYAN background inside. Double-clicking the composite will open a MessageDialog afer a delay of 1 second. Now, if one double clicks the composite and then quickly hits the (vertical) scroll bar (not the thumb) several times while the dialog is opening, the scroll bar will start moving even after the (modal) dialog has opened. After that state has been reached, and closing the dialog, dragging the thumb of the scroll bar will erase the composite as described. Very annoying.
Note that this happens along the vertical and the horizontal scrollbar, but only when dragging the thumb. The effect also remains if I programmatically call repaint() - the repaint will paint the whole composite, but dragging the thumb will again erase. However, when I click the bar outside the thumb, and repaint thereafter, all is well again...
Happens under WindowsXP and 7, Eclipse 3.6, 3.7, 3.8. Dont happen under Linux.
Attached you find the demo program and an image showing the effect.
(Size: 26.80KB, Downloaded 90 times)
(Size: 2.86KB, Downloaded 94 times)
Powered by FUDForum
. Page generated in 0.05534 seconds