GUIDE toolbar user defined callbacks mouse click intercepts

I'm using GUIDE 2019b with a toolbar. I have overridden the built-in functionality for the datatip tool. It works fine, but my issue is when the user selects another toolbar tool, say 'Zoom', and then selects datatips, the zoom tool continues to receive the mouse clicks. Mouse clicks are only received by the datatip callback when the user deselects zoom and then selects datatips, which is not standard with the built in toolbar tools without user defined callbacks. I implemented off and on callbacks for all icons to select the tool. When datatips is selected, the following code is run in my uiDataTip On callback function. Is there something else that needs to be done to send mouse click events to the datatip callback function? Datatips works as long as another toolbar is not already selected, otherwise the previous toolbar receives the events.
if ~strcmp(get(toolbar.Children(i), 'Tag'), 'uiDataTip')
set(toolbar.Children(i), 'State', 'off');
end
guidata(hObject, handles);

回答(0 个)

类别

帮助中心File Exchange 中查找有关 Interactive Control and Callbacks 的更多信息

产品

版本

R2019b

提问:

TV
2023-5-4

Community Treasure Hunt

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

Start Hunting!

Translated by