Frequently Asked Component Specific Questions
Options |
Display all FAQ items |
Displaying items 1 to 1 of 1, page 1 of 1
<< previous next >>



Automatically selecting PlannerItems on mouse hovering
Normally, a PlannerItem is set in the selected state when the mouse clicks the PlannerItem. By default, to start editing a PlannerItem, it is required to first select it and then click again to start editing. It is easy to avoid the first click to select the item by programmatically auto select it on mouse hovering. Following code snippet will perform this automatic selection:
procedure TForm2.Planner1PlannerMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer); var item: TPlannerItem; begin item := planner1.XYToItem(x,y); if Assigned(item) then Planner1.Items.Select(item); end;