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 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!