Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2012-12

Right clicking buttons - no OnClick event?

6 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Crone, Thomas J.

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?

Tom Crone

Reply by email

Crone, Thomas J.
to Reinier Olislagers

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

Reply by email

Alejandro Gonzalo
to Crone, Thomas J.: I'm using Lazarus IDE v1.0.2 on Windows 7. When I right click a button, I don't get an…

Probably to avoid interference with any Menu defined for the Form. ?
A. G.
?

Earlier message 21 lines
----- Original Message ----- > From: "Crone, Thomas J." > To: "Lazarus mailing list ?[]?" > Cc: > Sent: Saturday, December 15, 2012 12:01 PM > Subject: [Lazarus] Right clicking buttons - no OnClick event? > > 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? > > Tom Crone > > -- > _______________________________________________ > Lazarus mailing list > > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus >

Reply by email