View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006402 | JEDI VCL | 00 JVCL Components | public | 2015-04-17 05:04 | 2020-05-19 09:55 |
Reporter | arhaha | Assigned To | obones | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | suspended | ||
Product Version | Daily / GIT | ||||
Target Version | Fixed in Version | ||||
Summary | 0006402: TJvCustomItemViewer can't implement multi items drag | ||||
Description | if you want implement multiple items drag, so firstly you select some items, the first, the second and the third item has been selected in sequence, then use mouse to click the second item and start to drag, code like below: procedure TMyJvOwnerDrawViewer.MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Integer); var ItemInx: Integer; begin inherited MouseDown(Button, Shift, X, Y); if Button = mbLeft then begin ItemInx := Self.ItemAtPos(X, Y, True); if (ItemInx >= 0) and (ItemInx < Self.Count) then begin if cdsSelected in Items[ItemInx].State then begin Self.BeginDrag(False, 10); end; end; end; end; Then you will find that the third item will be unselected! To fix this bug, we need add some code in unit JvCustomItemViewer.pas like this: procedure TJvCustomItemViewer.SetSelectedIndex(const Value: Integer); begin // if (FSelectedIndex <> Value) then begin if (FSelectedIndex >= 0) and (FSelectedIndex < Count) and (cdsSelected in Items[FSelectedIndex].State) and not Options.MultiSelect { <--- Support multiple item drag, Added By DSLIN, 2015-04-17 } then Items[FSelectedIndex].State := Items[FSelectedIndex].State - [cdsSelected]; FSelectedIndex := Value; if (Value >= 0) and (Value < Count) and not (cdsSelected in Items[Value].State) then Items[Value].State := Items[Value].State + [cdsSelected]; end; end; | ||||
Tags | No tags attached. | ||||
Date Modified | Username | Field | Change |
---|---|---|---|
2015-04-17 05:04 | arhaha | New Issue | |
2015-09-14 11:23 | obones | Note Added: 0021189 | |
2015-09-14 11:23 | obones | Status | new => feedback |
2020-05-19 09:55 | obones | Assigned To | => obones |
2020-05-19 09:55 | obones | Status | feedback => resolved |
2020-05-19 09:55 | obones | Resolution | open => suspended |
2020-05-19 09:55 | obones | Note Added: 0021891 |