Hello all.
How to implement onMouseWell in SynEdit ?
thanks

Mailing lists / lazarus / 2013-08
9 messages · 3 people · –
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
Hello all.
How to implement onMouseWell in SynEdit ?
thanks
Junior wroteHello all. How to implement onMouseWell in SynEdit ?
do you mean onMouseWheel?
Yes, sorry for the speed on writing.
no problem... i was just thinking that if it existed and you were misspelling it like above, you would be missing it ;)
i'll let others provide further on this since i know nothing about it...
Hello all. How to implement onMouseWell in SynEdit ? thanks
Junior wroteHello all. How to implement onMouseWell in SynEdit ?
looks like a bug
procedure TCustomSynEdit.WMMouseWheel(var Message: TLMMouseEvent);only calls inherited, if there are no scrollbars.
try to change it to the below. (int synedit.pp
I have not tested it yet... will do later
procedure TCustomSynEdit.WMMouseWheel(var Message: TLMMouseEvent);
var
lState: TShiftState;
MousePos: TPoint;
begin
if ((sfHorizScrollbarVisible in fStateFlags) and (Message.Y >
ClientHeight)) or
((sfVertScrollbarVisible in fStateFlags) and (Message.X >
ClientWidth))
then begin
inherited;
exit;
end;
MousePos.X := Message.X;
MousePos.Y := Message.Y;
if DoMouseWheel(lState, Message.WheelDelta, MousePos) then begin
Message.Result := 1; // handled
exit;
end;
lState := Message.State - [ssCaps, ssNum, ssScroll]; // Remove
unreliable states, see http://bugs.freepascal.org/view.php?id=20065
FMouseClickDoPopUp := False;
IncPaintLock;
try
if Message.WheelDelta > 0 then begin
FindAndHandleMouseAction(mbXWheelUp, lState, Message.X,
Message.Y, ccSingle, cdDown, Message.WheelDelta);
end
else begin
// send megative delta
FindAndHandleMouseAction(mbXWheelDown, lState, Message.X,
Message.Y, ccSingle, cdDown, Message.WheelDelta);
end;
finally
DecPaintLock;
end;
if FMouseClickDoPopUp and (PopupMenu nil) then begin
PopupMenu.PopupComponent:=self;
PopupMenu.PopUp;
end;
Message.Result := 1 // handled, skip further handling by interface
end;looks like a bug procedure TCustomSynEdit.WMMouseWheel(var Message: TLMMouseEvent); only…
The bars work, I wanted to implement the event because they appear in the Object Inspector.
Junior wroteThe bars work, I wanted to implement the event because they appear in the Object Inspector.
Really? They do not here. What version are you running?
They appear in code completion. but not OI.
I will publish them though.
Lazarus 1.1 r42442M FPC 2.6.2 i386-linux-gtk 2