Function Reference: Volume 2 (F-O) - The MathWorks - #1051

/ 1568


catalogue search
P. 1051
P. 1052
P. 1053
P. 1054
P. 1055
P. 1056
P. 1057
P. 1058
P. 1059
P. 1060
P. 1061
P. 1062
P. 1063
P. 1064
P. 1065
P. 1066
P. 1067
P. 1068
P. 1069
P. 1070
P. 1071
P. 1072
P. 1073
P. 1074
P. 1075
P. 1076
P. 1077
P. 1078
P. 1079
P. 1080
P. 1081
P. 1082
P. 1083
P. 1084
P. 1085
P. 1086
P. 1087
P. 1088
P. 1089
P. 1090
P. 1091
P. 1092
P. 1093
P. 1094
P. 1095
P. 1096
P. 1097
P. 1098
P. 1099
P. 1100


See other catalogues for The MathWorks

Text version of the page
Line Properties
The following example shows how to access the callback object's handle as well as the handle of the figure that contains the object from the callback function.
function button_down(src,evnt)
% src - the object that is the source of the event % evnt - empty for this property
sel_typ = get(gcbf,'SelectionType') switch sel_typ case 'normal'
disp('User clicked left-mouse button') set(src,'Selected','on') case 'extend'
disp('User did a shift-click') set(src,'Selected','on') case 'alt'
disp('User did a control-click')
set(src,'Selected','on')
set(src,'SelectionHighlight','off')
end
end
Suppose h is the handle of a line object and that the button_down function is on your MATLAB path. The following statement assigns the function above to the ButtonDownFcn:
set(h,'ButtonDownFcn',@button_down)
See "Function Handle Callbacks" for information on how to use function handles to define the callback function.
Children
vector of handles
The empty matrix; line objects have no children.
Clipping
{on} | off
2-1995

pageCatalog pdf di En 2012-06-22-01