![]() | Steema Issues DatabaseNote: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;otherwise you can use StackOverflow. Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy. |
| Summary: | TeeGrid makes it impossible to correctly detect user has selected the same cell twice | ||
|---|---|---|---|
| Product: | TeeGrid for Delphi | Reporter: | dean.mustakinov |
| Component: | Grid | Assignee: | david berneda <david> |
| Status: | RESOLVED FIXED | ||
| Severity: | enhancement | CC: | marc |
| Priority: | --- | ||
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows | ||
| Chart Series: | --- | Delphi / C++ Builder RAD IDE Version: | |
Looks good Dean, thanks. |
TeeGrid calls OnSelect event only the first time user clicks on the same cell and this event is called after OnClick and OnMouseUp events so there is no way to detect that user has clicked the same cell twice. First time in OnClick/OnMouseUp the previous cell is still selected and second time OnSelect is not called. I have made a small change to TeeGrid so OnSelect is called every time the cell is selected. Tee.Grid.Selection.pas: procedure TGridSelection.Change change to function - function TGridSelection.Change(const AColumn: TColumn; const ARow: Integer): boolean; // DM CHANGE begin if (Column<>AColumn) or (Row<>ARow) then begin ChangeColumn(AColumn); DoChangeRow(ARow); ResetRange; DoChanged; result := true; // DM CHANGE end else result := false; // DM CHANGE end; Tee.Grid.RowGroup.pas: in function TRowGroup.Mouse line Selected.Change(AColumn,ARow); changed to if not Selected.Change(AColumn,ARow) then // DM CHANGE if Assigned(Selected.OnChange) then Selected.OnChange(Selected);