Re: Rightclick

Marnaud <[email protected]> Thu, 03 May 2018 15:29:23 +0200
Newsgroups gmane.comp.lang.realbasic.user
Message-ID <[email protected]>
> Le 3 mai 2018 à 15:24 du soir, Bernd Fröhlich <[email protected]> a écrit:
> 
> I feel like I´m missing something obvious here:
> 
> I would like to determine if a user clicked on a listbox row using the left or the right mousebutton but there is only a "CellClick" event. So how do I get the information which mousebutton was used?

You have two ways:
In general, to know whether the user clicked with the right mouse button, you'd use the IsContextualClick method:

if IsContextualClick then
	MsgBox "You right-clicked!"
end if

The other way, if you just want to show a contextual menu in your listbox, you can also use the ConstructContextualMenu event.