MATLAB Function Reference (Volume 2: Graphics)
MATLAB Function Reference (Volume 2: Graphics) MATLAB Function Reference (Volume 2: Graphics)
uicontrol PropertiesUicontrolProperties2uicontrol PropertiesYou can set default uicontrol properties on the root and figure levels:set(0,'DefaultUicontrolProperty',PropertyValue...)set(gcf,'DefaultUicontrolProperty',PropertyValue...)where Property is the name of the uicontrol property whose default value youwant to set and PropertyValue is the value you are specifying. Use set and getto access uicontrol properties.Curly braces { } enclose the default value.BackgroundColorColorSpecObject background color. The color used to fill the uicontrol rectangle. Specifya color using a three-element RGB vector or one of MATLAB’s predefinednames. The default color is determined by system settings. See ColorSpec formore information on specifying color.BusyActioncancel | {queue}Callback routine interruption. If a callback is executing and the user triggersan event (such as a mouse click) on an object for which a callback is defined,that callback attempts to interrupt the first callback. The first callback can beinterrupted only at a drawnow, figure, getframe, pause, or waitfor command;if the callback does not contain any of these commands, it cannot beinterrupted.If the Interruptible property of the object whose callback is executing is off(the default value is on), the callback cannot be interrupted (except by certaincallbacks; see the note below). The BusyAction property of the object whosecallback is waiting to execute determines what happens to the callback:• If the value is queue, the callback is added to the event queue and executesafter the first callback finishes execution.• If the value is cancel, the event is discarded and the callback is not executed.Note If the interrupting callback is a DeleteFcn or CreateFcn callback or afigure’s CloseRequest or ResizeFcn callback, it interrupts an executingcallback regardless of the value of that object’s Interruptible property. The2-542
uicontrol Propertiesinterrupting callback starts execution at the next drawnow, figure, getframe,pause, or waitfor statement.ButtonDownFcn stringButton press callback routine. A callback routine that executes whenever youpress a mouse button while the pointer is in a five-pixel wide border around theuicontrol. When the uicontrol’s Enable property is set to inactive or off, theButtonDownFcn executes when you click the mouse in the five-pixel border oron the control itself. This is useful for implementing actions to interactivelymodify control object properties, such as size and position, when they areclicked on (using selectmoveresize, for example).Define this routine as a string that is a valid MATLAB expression or the nameof an M-file. The expression executes in the MATLAB workspace.The Callback property defines the callback routine that executes when youactivate the enabled uicontrol (e.g., click on a push button).CallbackstringControl action. A routine that executes whenever you activate the uicontrolobject (e.g., when you click on a push button or move a slider). Define thisroutine as a string that is a valid MATLAB expression or the name of an M-file.The expression executes in the MATLAB workspace.To execute the callback routine for an editable text control, type in the desiredtext, then either:• Move the focus off the object (click the mouse someplace else in the GUI),• For a single line editable text box, press Return, or• For a multiline editable text box, press Ctl-Return.Callback routines defined for frames and static text do not execute because noaction is associated with these objects.CDatamatrixTruecolor image displayed on control. A three-dimensional matrix of RGBvalues that defines a truecolor image displayed on either a push button ortoggle button. Each value must be between 0.0 and 1.0. More information aboutthis property.2-543
- Page 521 and 522: Surface PropertiesMarkerSize size i
- Page 523 and 524: Surface PropertiesVertexNormals vec
- Page 525 and 526: surfllight source, use surfl(X',Y',
- Page 527 and 528: surfnormPurpose2surfnormCompute and
- Page 529 and 530: terminalPurpose2terminalSet graphic
- Page 531 and 532: texlabelPurpose2texlabelProduce TeX
- Page 533 and 534: textPurpose2textCreate text object
- Page 535 and 536: textannotate the point at (pi,0) wi
- Page 537 and 538: textProperty Name Property Descript
- Page 539 and 540: textProperty Name Property Descript
- Page 541 and 542: Text PropertiesCreateFcnstringCallb
- Page 543 and 544: Text PropertiesExtentposition recta
- Page 545 and 546: Text PropertiesWhen a handle is not
- Page 547 and 548: Text PropertiesPosition[x,y,[z]]Loc
- Page 549 and 550: Text PropertiesCharacterSequenceSym
- Page 551 and 552: Text PropertiesVerticalAlignment to
- Page 553 and 554: titlePurpose2titleAdd title to curr
- Page 555 and 556: trimeshPurpose2trimeshTriangular me
- Page 557 and 558: uicontextmenuPurpose2uicontextmenuC
- Page 559 and 560: uicontextmenuWhen the user extend-c
- Page 561 and 562: uicontextmenu Propertiesdefines a d
- Page 563 and 564: uicontextmenu Propertieswhere vecto
- Page 565 and 566: uicontrolString property (even thou
- Page 567 and 568: uicontrolProperty Name Property Des
- Page 569 and 570: uicontrolProperty Name Property Des
- Page 571: uicontrolObjectHierarchyRootFigureA
- Page 575 and 576: uicontrol Properties• on - The ui
- Page 577 and 578: uicontrol PropertiesFixedWidthFontN
- Page 579 and 580: uicontrol Propertiesdefined, that c
- Page 581 and 582: uicontrol Properties• Toggle butt
- Page 583 and 584: uicontrol PropertiesFor multiple li
- Page 585 and 586: uicontrol PropertiesSet the Value p
- Page 587 and 588: uigetfileSee Alsouiputfile2-557
- Page 589 and 590: uimenuYou can set and query propert
- Page 591 and 592: uimenuExamplesThis example creates
- Page 593 and 594: uimenu Propertiescallbacks; see the
- Page 595 and 596: uimenu PropertiesForegroundColor Co
- Page 597 and 598: uimenu Propertiescharacter while th
- Page 599 and 600: uiputfilePurpose2uiputfileInteracti
- Page 601 and 602: uiresume, uiwaitPurpose2uiresume, u
- Page 603 and 604: uisetfontPurpose2uisetfontModify fo
- Page 605 and 606: viewPurpose2viewViewpoint specifica
- Page 607 and 608: viewaxes graphics object properties
- Page 609 and 610: viewmtxT = viewmtx(az,el,phi,xc) re
- Page 611 and 612: viewmtxTransform the cube vectors t
- Page 613 and 614: waitforPurpose2waitforWait for cond
- Page 615 and 616: warndlgPurpose2warndlgDisplay warni
- Page 617 and 618: waterfallExamplesProduce a waterfal
- Page 619 and 620: xlabel, ylabel, zlabelPurpose2xlabe
- Page 621 and 622: xlim, ylim, zlimExamplesThis exampl
uicontrol Propertiesinterrupting callback starts execution at the next drawnow, figure, getframe,pause, or waitfor statement.ButtonDownFcn stringButton press callback routine. A callback routine that executes whenever youpress a mouse button while the pointer is in a five-pixel wide border around theuicontrol. When the uicontrol’s Enable property is set to inactive or off, theButtonDownFcn executes when you click the mouse in the five-pixel border oron the control itself. This is useful for implementing actions to interactivelymodify control object properties, such as size and position, when they areclicked on (using selectmoveresize, for example).Define this routine as a string that is a valid <strong>MATLAB</strong> expression or the nameof an M-file. The expression executes in the <strong>MATLAB</strong> workspace.The Callback property defines the callback routine that executes when youactivate the enabled uicontrol (e.g., click on a push button).CallbackstringControl action. A routine that executes whenever you activate the uicontrolobject (e.g., when you click on a push button or move a slider). Define thisroutine as a string that is a valid <strong>MATLAB</strong> expression or the name of an M-file.The expression executes in the <strong>MATLAB</strong> workspace.To execute the callback routine for an editable text control, type in the desiredtext, then either:• Move the focus off the object (click the mouse someplace else in the GUI),• For a single line editable text box, press Return, or• For a multiline editable text box, press Ctl-Return.Callback routines defined for frames and static text do not execute because noaction is associated with these objects.CDatamatrixTruecolor image displayed on control. A three-dimensional matrix of RGBvalues that defines a truecolor image displayed on either a push button ortoggle button. Each value must be between 0.0 and 1.0. More information aboutthis property.2-543