Prevent the movement of a figure with GUIDE
Show older comments
Hello,
I am working with Matlab R2015a and use GUIDE to create my interface. When I launch my interface, a general figure contains buttons, text boxes, etc. What I wish is to prevent the movement of this general figure. Why? Because by clicking on a pushbutton, I can switch into another general figure (as if it was 2 tabs of a same figure). And I don't want any user move this general figure.
Thank you for your help. Best regards.
Accepted Answer
More Answers (1)
Lincoln Emilio Bowen Aguayo
on 8 Jul 2015
In this way you can make a GUI, and the user cannot modify your interface:
function tabbedGUI()
hFig = figure('Menubar','none', 'Position', [25 50 1250 550]);
set (gcf, 'units', 'normalized', 'outerposition', [0 0 1 1]);
s = warning('off', 'MATLAB:uitabgroup:OldVersion');
hTabGroup = uitabgroup('Parent',hFig);
warning(s);
hTabs(1) = uitab('Parent',hTabGroup, 'Title','Opcion 1');
hTabs(2) = uitab('Parent',hTabGroup, 'Title','Opción 2');
set(hTabGroup, 'SelectedTab',hTabs(1));
uicontrol ('Style', 'pushbutton',...
'String', 'Compute',...
'BackgroundColor', [.5 .5 .5],...
'Position', [500 500 100 50],...
'Callback', @ComputeCallback,...
'Parent', hTabs(1));
function ComputeCallback (src, evt)
end
end

%
1 Comment
Categories
Find more on Interactive Control and Callbacks in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!