View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006723 | JEDI VCL | 00 JVCL Components | public | 2021-07-27 09:40 | 2021-07-27 09:40 |
Reporter | CDametto | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | new | Resolution | open | ||
Platform | Delphi 10.3 Rio | OS | Windows 10 | OS Version | 10.00.18363 |
Product Version | Daily / GIT | ||||
Target Version | Fixed in Version | ||||
Summary | 0006723: JvDBGrid - Problems with resizing when gdRowSelect is in options | ||||
Description | Using the gdRowSelect grid option, there are some problems in resizing. All problems happens when the horizontal scrollbar is present and you move to a column at the right side. 1) If you resize a column on the right by double-clicking between two columns, the grid is repositioned to the start left. 2) The same thing happens if you resize the grid together with the form. 3) Resizing a column on the right makes the grid flicker. | ||||
Steps To Reproduce | I attach a little program where you can see these issues. | ||||
Additional Information | Inheriting from the grid I got around the three problems like this: 1) procedure TArJvDBGrid.DblClick; var ALeftCol: Integer; begin if dgRowSelect in Options then begin ALeftCol := LeftCol; SendMessage(Handle, WM_SETREDRAW, WPARAM(False), 0); try inherited; LeftCol := ALeftCol; finally SendMessage(Handle, WM_SETREDRAW, WPARAM(True), 0); Invalidate; end; end else inherited; end; 2) procedure TArJvDBGrid.WMSize(var Message: TWMSize); var ALeftCol: Integer; begin if dgRowSelect in Options then begin ALeftCol := LeftCol; SendMessage(Handle, WM_SETREDRAW, WPARAM(False), 0); try inherited; LeftCol := ALeftCol; finally SendMessage(Handle, WM_SETREDRAW, WPARAM(True), 0); Invalidate; end; end else inherited; end; 3) procedure TArJvDBGrid.MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); begin if (dgRowSelect in Options) and (Button = mbLeft) and (FGridState = gsColSizing) then begin SendMessage(Handle, WM_SETREDRAW, WPARAM(False), 0); try inherited MouseUp(Button, Shift, X, Y); finally SendMessage(Handle, WM_SETREDRAW, WPARAM(True), 0); Invalidate; end; end else inherited MouseUp(Button, Shift, X, Y); end; | ||||
Tags | JvDbGrid | ||||