Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Doblu-click on a cell in uitable?

337 views
Skip to first unread message

Iman

unread,
Jan 18, 2010, 1:50:22 PM1/18/10
to
Hi,

I want to start an action in a GUI by double-clicking on a cell in a table (created by uitable). I can capture the selection through the CallSelectionCallback function but I can not capture the double-clicking.
Usually after a double click the SelectionType property of the figure changes to Open but in this case it remains at Normal.

Any suggestions?

Iman

unread,
Feb 11, 2010, 1:13:05 PM2/11/10
to
Come on guys! Any ideas?

Iman

"Iman " <iza...@yahoo.com> wrote in message <hj2ahe$jrk$1...@fred.mathworks.com>...

Ragaar Ashnod

unread,
Nov 17, 2010, 11:17:06 AM11/17/10
to
function MouseClickHandler(handle,cbData)
% handle ~ java object UITablePeer
% cbData ~ callback data for the MouseClickedCallback event

switch get(cbData,'ClickCount')
case 1
SingleClickHandler(handles,cbData);
case 2
DoubleClickHandler(handles,cbData);
otherwise
% unhandled for now
end
end

function main()
h=figure;
table = uitable;
set(table,'Data',rand(3))

uitablepeer = findjobj(h, '-nomenu', 'class', 'uitablepeer');
set(uitablepeer,'MouseClickedCallback',@MouseClickHandler)
end

Lockywolf

unread,
Mar 19, 2016, 6:06:07 AM3/19/16
to
"Ragaar Ashnod" wrote in message <ic0v62$ge5$1...@fred.mathworks.com>...
For some reason it doesn't work in 2015b in GUIDE gui.

I mean, the callback gets successfully registered and is executed as long as the function from which you have performed the registration is running.

However, when the function is waiting, even though the callback is registered (I checked that through uiinspect), it's not getting executed.

Currently I emulate the desired behaviour by having a persistent variable in the CellSelectionCallback, but it's a dirty trick.
0 new messages