12.07.2015 Views

Basics of MATLAB and Beyond

Basics of MATLAB and Beyond

Basics of MATLAB and Beyond

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

uicontrol(’Pos’,[110 280 60 19],’Style’,’text’,’String’,’Name:’);uicontrol(’Pos’,[175 280 246 19],’Style’,’edit’);uicontrol(’Pos’,[110 262 60 19],’Style’,’text’,...’String’,’Address:’);uicontrol(’Pos’,[175 262 246 19],’Style’,’edit’);uicontrol(’Pos’,[110 243 60 19],’Style’,’text’,’String’,’Sex:’);uicontrol(’Pos’,[175 243 121 19],’Style’,’radiobutton’,...’String’,’Male’);uicontrol(’Pos’,[301 243 121 19],’Style’,’radiobutton’,...’String’,’Female’);FrameThe frame style uicontrol is not an object that is meant to be interactedwith. It is a decoration. For example, in the GUI in the previous sectionthe text labels st<strong>and</strong> apart from the uicontrols they refer to because thefigure color is not the same as the background colour. You can get amore integrated appearance by adding a frame:uicontrol(’Position’,[99 231 332 77],’Style’,’frame’);uicontrol(’Position’,[110 280 60 19],’Style’,’text’,...’String’,’Name:’);uicontrol(’Position’,[175 280 246 19],’Style’,’edit’);uicontrol(’Position’,[110 262 60 19],’Style’,’text’,...’String’,’Address:’);uicontrol(’Position’,[175 262 246 19],’Style’,’edit’);uicontrol(’Position’,[110 243 60 19],’Style’,’text’,...’String’,’Sex:’);uicontrol(’Position’,[175 243 121 19],’Style’,’radiobutton’,...’String’,’Male’);uicontrol(’Position’,[301 243 121 19],’Style’,’radiobutton’,...’String’,’Female’);You must issue the comm<strong>and</strong>s to draw the uicontrols over the frameafter you issue the frame comm<strong>and</strong>, otherwise the frame will obscurethe uicontrols. Some people like to divide their GUIs into sections usingframes. In this GUI are three frames:c○ 2000 by CRC Press LLC

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!