0% found this document useful (0 votes)
371 views

How To Make Double Click in Matlab

The document discusses how to use double clicks in MATLAB. It explains that MATLAB has a 'selectiontype' property for figures that determines if a click is single or double. It provides an example of playing an audio file on double click of a listbox by checking if the selectiontype is 'open', indicating a double click. The document aims to help readers access double clicks in their MATLAB graphical user interface programs.

Uploaded by

Jans Hendry
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
371 views

How To Make Double Click in Matlab

The document discusses how to use double clicks in MATLAB. It explains that MATLAB has a 'selectiontype' property for figures that determines if a click is single or double. It provides an example of playing an audio file on double click of a listbox by checking if the selectiontype is 'open', indicating a double click. The document aims to help readers access double clicks in their MATLAB graphical user interface programs.

Uploaded by

Jans Hendry
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 2

[all about matlab]

January 19, 2013

HOW TO MAKE DOUBLE CLICK IN MATLAB

Kali ini kita akan membahas bagaimana menggunakan DOUBLE CLICK dalam Matlab. Dalam Matlab, akses doubleclick berbeda dengan program visual lainnya. Matlab sendiri menyediakan property pada figure yang disebut dengan selectiontype. Property ini berlaku untuk semua control yang ada pada jendela figure GUI kita. Sehingga untuk akses bisa dilakukan pada callback dari masing-masing control. Misalnya saya punya program GUI berikut ini:

Saya ingin ketika memberikan aksi doubleclick pada listbox, maka file audio akan dimainkan. Maka syntaxnya adalah

[[email protected]]

Page 1

[all about matlab]

January 19, 2013

bb = get(handles.figure1, 'selectiontype'); if strcmp(bb,'open') wmp.URL = [patht song]; wmp.controls.play; else return; end

tampak bahwa hal yang pertama kita lakukan adalah mengambil status dari aksi click pada figure. Bila saat itu selectiontype nya adalah OPEN maka artinya aksi click adalah DOUBLE CLICK. Bila single click maka selectiontype nya adalah NORMAL. Semoga ini bisa membantu anda. Selamat mencoba

@ thankssss..

[[email protected]]

Page 2

You might also like