View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0035472 | Lazarus | LCL | public | 2019-04-30 13:32 | 2019-10-11 12:27 |
Reporter | Pavol S | Assigned To | wp | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | reopened | ||
Product Version | 2.0 | ||||
Summary | 0035472: TStringGrid/TDrawGrid horizontal scrollbar bug after form maximize | ||||
Description | Horizontal scrollbar is still visible at wrong position after form maximzed and scrollbar is no longer needed. Platform:Windows 10. | ||||
Steps To Reproduce | 1. Place TStringGrid on form 2. set aling alClient 3. set ColCount at least 12 (or until Horizontal scrollbar is visible) (don't add rows) Run app and scroll with scrollbar to right (at least 1px). Maximize form. -> Scrollbar is in original position. | ||||
Additional Information | Fix: lcl\grids.pas: procedure TCustomGrid.UpdateHorzScrollBar(const aVisible: boolean; const aRange,aPage,aPos: Integer); var NeedUpdate: Boolean; begin {$ifdef DbgScroll} DebugLn('TCustomGrid.UpdateHorzScrollbar: Vis=%s Range=%d Page=%d aPos=%d', [dbgs(aVisible),aRange, aPage, aPos]); {$endif} NeedUpdate := FHSbVisible<>Ord(aVisible); if NeedUpdate then ScrollBarShow(SB_HORZ, aVisible); if aVisible or NeedUpdate then ScrollBarRange(SB_HORZ, aRange, aPage, aPos); { original code here if FHSbVisible<>Ord(aVisible) then ScrollBarShow(SB_HORZ, aVisible); if aVisible then ScrollBarRange(SB_HORZ, aRange, aPage, aPos); } end; | ||||
Tags | StringGrid, TDrawGrid, TStringGird | ||||
Fixed in Revision | r62031 | ||||
LazTarget | 2.0.6 | ||||
Widgetset | Win32/Win64 | ||||
Attached Files |
|
|
|
|
Added patch as file. 35472-patch.diff (846 bytes)
Index: C:/development/svnlazarus/lazarus/lcl/grids.pas =================================================================== --- C:/development/svnlazarus/lazarus/lcl/grids.pas (revision 61998) +++ C:/development/svnlazarus/lazarus/lcl/grids.pas (working copy) @@ -7932,14 +7932,17 @@ procedure TCustomGrid.UpdateHorzScrollBar(const aVisible: boolean; const aRange,aPage,aPos: Integer); +var + NeedUpdate: Boolean; begin {$ifdef DbgScroll} DebugLn('TCustomGrid.UpdateHorzScrollbar: Vis=%s Range=%d Page=%d aPos=%d', [dbgs(aVisible),aRange, aPage, aPos]); {$endif} - if FHSbVisible<>Ord(aVisible) then + NeedUpdate := FHSbVisible<>Ord(aVisible); + if NeedUpdate then ScrollBarShow(SB_HORZ, aVisible); - if aVisible then + if aVisible or NeedUpdate then ScrollBarRange(SB_HORZ, aRange, aPage, aPos); end; |
|
Applied your patch. Please test and close if ok. |
Date Modified | Username | Field | Change |
---|---|---|---|
2019-04-30 13:32 | Pavol S | New Issue | |
2019-04-30 13:32 | Pavol S | File Added: form-before.png | |
2019-04-30 13:32 | Pavol S | File Added: form-maximizded.png | |
2019-04-30 13:35 | Pavol S | Tag Attached: StringGrid | |
2019-04-30 13:35 | Pavol S | Tag Attached: TStringGird | |
2019-04-30 13:35 | Pavol S | Tag Attached: TDrawGrid | |
2019-05-03 03:10 | Jesus Reyes | Assigned To | => Jesus Reyes |
2019-05-03 03:10 | Jesus Reyes | Status | new => assigned |
2019-10-08 07:55 | Pavol S | File Added: 35472-patch.diff | |
2019-10-08 07:55 | Pavol S | Note Added: 0118402 | |
2019-10-11 12:23 | wp | Assigned To | Jesus Reyes => wp |
2019-10-11 12:23 | wp | Status | assigned => resolved |
2019-10-11 12:23 | wp | Resolution | open => fixed |
2019-10-11 12:23 | wp | Fixed in Revision | => r62031 |
2019-10-11 12:23 | wp | LazTarget | => 2.2 |
2019-10-11 12:23 | wp | Widgetset | Win32/Win64 => Win32/Win64 |
2019-10-11 12:23 | wp | Note Added: 0118492 | |
2019-10-11 12:27 | wp | Status | resolved => assigned |
2019-10-11 12:27 | wp | Resolution | fixed => reopened |
2019-10-11 12:27 | wp | LazTarget | 2.2 => 2.0.6 |
2019-10-11 12:27 | wp | Status | assigned => resolved |
2019-10-11 12:27 | wp | Widgetset | Win32/Win64 => Win32/Win64 |