[Lazarus] Right clicking buttons - no OnClick event?
Crone, Thomas J.
crone at cua.edu
Sat Dec 15 21:28:54 CET 2012
The competition/inspiration/other's doc says:
Use the OnClick event handler to respond when the user clicks the control.
<<cut>>
Usually, OnClick occurs when the user presses and releases the left mouse button with the mouse pointer over the control. This event can also occur when: ...
So it doesn't outlaw OnClick for right click... :-)
Or could there be an OnRightClick event?
I have a Step button in a celluar automaton program, and hoped to have left click
do one more line, right click to 10 more lines, and shift-click to 10 times the unshifted...
Now, in OnMouseDown, I have:
if Button=mbRight then StepCount:=10 else StepCount:=1;
if ssShift in Shift then StepCount:=10*StepCount;
Then in OnClick I use StepCount, but I have to doubleClick to get OnClick to fire....
Tom
________________________________________
From: Reinier Olislagers [reinierolislagers at gmail.com]
Sent: Saturday, December 15, 2012 3:04 PM
To: Lazarus mailing list
Subject: Re: [Lazarus] Right clicking buttons - no OnClick event?
On 15-12-2012 21:01, Crone, Thomas J. wrote:
> I'm using Lazarus IDE v1.0.2 on Windows 7.
>
> When I right click a button, I don't get an OnClick Event?
>
> Is this expected? If so, why?
>
Seems we're faithfully following the competition/inspiration/other product:
http://docwiki.embarcadero.com/Libraries/XE3/en/Vcl.StdCtrls.TButton.OnClick
.. that states the event fires for left mouse click, but nothing about
right mouse click..
--
_______________________________________________
Lazarus mailing list
Lazarus at lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
More information about the Lazarus
mailing list