GUIDE toolbar user defined callbacks mouse click intercepts

2 views (last 30 days)
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);

Answers (0)

Categories

Find more on Migrate GUIDE Apps in Help Center and File Exchange

Products


Release

R2019b

Community Treasure Hunt

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

Start Hunting!