View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006540 | JEDI VCL | 00 JVCL Components | public | 2016-12-09 14:24 | 2019-05-02 08:32 |
Reporter | CDametto | Assigned To | jfudickar | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 3.48 | ||||
Target Version | Fixed in Version | ||||
Summary | 0006540: Horizontal reset of dbgrid scrollbar by moving a column | ||||
Description | In a DBGrid with dgRowSelect in Options, TitleButton = True and TitleButtonAllowMove = True, whether the horizontal scrollbar is present and you move a column at the right end, the grid is repositioned to the start left. | ||||
Additional Information | This is my correction, in the file JvDBGrid.pas near the bottom of the MouseUp procedure... Original block: if (Button = mbLeft) and (FGridState = gsColSizing) then begin ALeftCol := LeftCol; inherited MouseUp(Button, Shift, X, Y); if (dgRowSelect in Options) then LeftCol := ALeftCol; if Assigned(OnColumnResized) then OnColumnResized(Self, FSizingIndex + Byte(not (dgIndicator in Options)) - 1, ColWidths[FSizingIndex]); end else inherited MouseUp(Button, Shift, X, Y); DoAutoSizeColumns; I just developed the penultimate row: if (Button = mbLeft) and (FGridState = gsColSizing) then begin ALeftCol := LeftCol; inherited MouseUp(Button, Shift, X, Y); if (dgRowSelect in Options) then LeftCol := ALeftCol; if Assigned(OnColumnResized) then OnColumnResized(Self, FSizingIndex + Byte(not (dgIndicator in Options)) - 1, ColWidths[FSizingIndex]); end else begin SI.cbSize := SizeOf(SI); // SI.fMask := SIF_POS; // Store scrollbar position GetScrollInfo(Handle, SB_HORZ, SI); // LockWindowUpdate(Handle); try inherited MouseUp(Button, Shift, X, Y); Perform(WM_HSCROLL, MakeWParam(SB_THUMBPOSITION, SI.nPos), 0); //Repos finally LockWindowUpdate(0); end; end; DoAutoSizeColumns; | ||||
Tags | No tags attached. | ||||
|
The variable SI is declared locally in the procedure as SI: TScrollInfo; |
|
Could you check if the issue is still present in the latest GIT content? If yes, please provide the zipped sources of an application showing this. |
2019-01-25 10:49
|
Demo.zip (6,546 bytes) |
|
The issue is still present in jvcl 3.50 with Delphi 10.3 rio |
2019-01-25 12:07
|
Demo_corrected.zip (54,752 bytes) |
|
Made this pull request out of your proposed fix: https://github.com/project-jedi/jvcl/pull/91 |
|
Pull request revoked and replaced by this improved one (better variable naming and commenting): https://github.com/project-jedi/jvcl/pull/116 |
|
Fixed in Repository |
Date Modified | Username | Field | Change |
---|---|---|---|
2016-12-09 14:24 | CDametto | New Issue | |
2016-12-28 16:35 | CDametto | Note Added: 0021407 | |
2018-07-18 15:52 | obones | Note Added: 0021521 | |
2018-07-18 15:52 | obones | Status | new => feedback |
2019-01-25 10:49 | CDametto | File Added: Demo.zip | |
2019-01-25 10:53 | CDametto | Note Added: 0021601 | |
2019-01-25 12:07 | CDametto | File Added: Demo_corrected.zip | |
2019-04-25 22:14 | mh | Note Added: 0021741 | |
2019-05-01 13:51 | mh | Note Added: 0021787 | |
2019-05-02 08:32 | jfudickar | Note Added: 0021788 | |
2019-05-02 08:32 | jfudickar | Status | feedback => resolved |
2019-05-02 08:32 | jfudickar | Resolution | open => fixed |
2019-05-02 08:32 | jfudickar | Assigned To | => jfudickar |