If a ListView has a column or more with #isAutoResize set to true, and
Windows is set to "Show window contents while dragging", I see the horizontal scrollbar flickering when its parent container is being resized. An example is the methods pane in a Browser. If I make the browser wider/narrower etc, the methods pane ListView gets the scrollbar flicker. If I change ListView>>layout: to use: rect := self clientRectangle. Instead of: rect := aLayoutContext clientRectangleOf: self. ... it gets rid of the flicker. Thanks, Steve |
"Steve Alan Waring" <[hidden email]> wrote in message
news:[hidden email]... > If a ListView has a column or more with #isAutoResize set to true, and > Windows is set to "Show window contents while dragging", I see the > horizontal scrollbar flickering when its parent container is being > resized. > > An example is the methods pane in a Browser. If I make the browser > wider/narrower etc, the methods pane ListView gets the scrollbar > flicker. > > If I change ListView>>layout: to use: > > rect := self clientRectangle. > > Instead of: > > rect := aLayoutContext clientRectangleOf: self. > > ... it gets rid of the flicker. Yes, I see the problem now you mention it. I suspect the problem could be the calculation of the correct client rectangle from the view rectangle stored in the layout context from a previous repositioning within the batch. We'll look at this for the next patch level, but since it is a cosmetic issue (very on my test machine and through my old eyes, the flicker is very faint) I'm afraid it will be a low priority item. Thanks for the report though Blair |
In reply to this post by Steve Alan Waring
"Steve Alan Waring" <[hidden email]> wrote in message
news:[hidden email]... > If a ListView has a column or more with #isAutoResize set to true, and > Windows is set to "Show window contents while dragging", I see the > horizontal scrollbar flickering when its parent container is being > resized. > > An example is the methods pane in a Browser. If I make the browser > wider/narrower etc, the methods pane ListView gets the scrollbar > flicker. Steve, I've attached a patch fix for this below if you (or anyone else) would like to try it. With all the different versions of Windows out there (or should I say versions of Windows in combination with different versions of IE) it can be difficult to verify that visual glitches are absent regardless of configuration, so I'd appreciate any feedback. Regards Blair ----------------------- !ListView methodsFor! onPositionChanged: aPositionEvent "We must resize any auto-sizing columns *before* WM_WINDOWPOSCHANGED is passed to the control, as that is when it updates scrollbars which can cause the horizontal scrollbar to briefly flicker if the column widths are not adjusted beforehand (#2103)." (aPositionEvent isRectangleChanged and: [self isReportMode]) ifTrue: [| width count | width := aPositionEvent width. count := self itemCount. count > 0 ifTrue: [| extent | extent := self lvmApproximateViewRect: count cx: width cy: aPositionEvent height. extent y - SystemMetrics current scrollbarHeight > aPositionEvent height ifTrue: [width := width - SystemMetrics current scrollbarWidth]]. self autoResizeColumns: width]. ^super onPositionChanged: aPositionEvent! ! !ListView categoriesFor: #onPositionChanged:!event handling!public! ! ListView removeSelector: #layout: ifAbsent: []! |
Hi Blair,
> of IE) it can be difficult to verify that visual glitches are absent > regardless of configuration, so I'd appreciate any feedback. I have just tried the patch and it looks great ... thanks! At first I missed the removal of #layout:... the scrollbar was jumping all over the place ... but once I removed #layout: it was as smooth as silk. I will put the fix in my main development image, and if I notice any problems I will let you know. FWIW: I needed to add: !SystemMetrics methodsFor! scrollbarHeight ^self nonClientMetrics iScrollHeight! ! !SystemMetrics categoriesFor: #scrollbarHeight!constants!public! ! Thanks, Steve |
Free forum by Nabble | Edit this page |