Hello,
for us would be useful if there will be a builtin event at at the end of the TAdvCustomMemo.WMLButtonDblClk after SelectionChanged statement.
The short story is when user double clicked on a word we would like to do some extra things. OnDblClick fires in TAdvCustomMemo.WMLButtonDblClk before selection is changed.
SelectionChange event is not enough because I do not know whether the word selected because of DblClick, or other.
I created a workaround.
I overrided the TAdvCustomMemo.WMLButtonDblClk:
TMyAdvMemo = class(TAdvMemo)
private
...
FDblClickOccured: Boolean;
...
procedure WMLButtonDblClk(var Message: TWMLButtonDblClk); message WM_LBUTTONDBLCLK;
...
public
property DblClickOccured: Boolean read FDblClickOccured;
end;
procedure TMyAdvMemo.WMLButtonDblClk(var Message: TWMLButtonDblClk);
begin
FDblClickOccured := True;
try
inherited;
finally
FDblClickOccured := False;
end;
end;
procedure TForm1.MyAdvMemo1SelectionChange(Sender: TObject);
begin
inherited;
if not MemoMetaExpr.DblClickOccured then
Exit;
LSelectedText := MyAdvMemo1.Selection;
// my extra logic
//...
end;
Thank you for your consideration.