[Lazarus] TListView and TPopupMenu and the right mouse button
Bernd Kreuss
prof7bit at googlemail.com
Tue Aug 3 07:26:57 CEST 2010
On 03.08.2010 02:32, Paul Ishenin wrote:
> PopupMenu.PopupAt();
Thanks, this almost works but there still must be something missing:
After a menu has been shown it needs two right mouse clicks into the
list until MouseDown events (for the right button) work again (this
makes three right mouse clicks to show the menu another time). List
selection works immediately but the next two right mouse button events
will not trigger the event method. Left clicks work immediately but the
next two right clicks won't trigger my event handler:
procedure TForm1.ListView1MouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
debugln(['TForm1.ListView1MouseDown ', x, ' ', y]);
if Button = mbRight then begin
PopupMenu1.PopUp();
end;
end;
More information about the Lazarus
mailing list