We've recently implemented an OnIndicatorDblClick event in TAdvSmoothTimeLine, and I'd love to see it incorporated into the official version:
private
FOnIndicatorDblClick: TAdvSmoothTimeLineIndicatorClick;
procedure WMLButtonDblClk(var Message: TWMLButtonDblClk); message WM_LBUTTONDBLCLK;
protected
procedure IndicatorDblClick;
published
property OnIndicatorDblClick
: TAdvSmoothTimeLineIndicatorClick read FOnIndicatorDblClick write
FOnIndicatorDblClick;
...
procedure TAdvSmoothTimeLine.WMLButtonDblClk(var Message: TWMLButtonDblClk);
begin
SendCancelMode(Self);
inherited;
if csCaptureMouse in ControlStyle then MouseCapture := True;
if csClickEvents in ControlStyle then IndicatorDblClick;
end;
procedure TAdvSmoothTimeLine.IndicatorDblClick;
begin
if FMouseDownOnIndicator then begin
if not FMouseMovedOnIndicator then begin
if (FSelectedIndicator >= 0) and (FSelectedIndicator <= TimeLineIndicators.Count - 1) then begin
if not FMbRight then begin
if Assigned(FOnIndicatorDblClick) and not FMouseMovedOnTimeLine then
FOnIndicatorDblClick(Self, TimeLineIndicators[FSelectedIndicator]);
end;
end;
end;
end;
end;
Jon