How can I know pressed mouse key on a GUI push button?

I have made a 'pushbutton' using GUI ('guide'). How can I know and display which mouse key (left, right or centre) I pressed over pushbutton?

2 Kommentare

Why would you need to know which mouse button is pressed over a pushbutton? Do you need to get different behavior depending on the mouse button pressed? If so, can't you use a pushbutton list?
MOHIT
MOHIT am 23 Jun. 2016
No, actually I need this behaviour, else I will have to make 9 pushbuttons

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Steven Lord
Steven Lord am 23 Jun. 2016

0 Stimmen

See the figure's SelectionType property.

1 Kommentar

MOHIT
MOHIT am 23 Jun. 2016
it is not a figure but a button on a figure created by 'guide'

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Graphics Object Properties finden Sie in Hilfe-Center und File Exchange

Gefragt:

am 23 Jun. 2016

Kommentiert:

am 23 Jun. 2016

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by