MATLAB Creating Graphical User Interfaces

(Barry) #1
Add Components to the GUIDE Layout Area

To enable selection of more than one item, you must specify the Max and Min
properties so that their difference is greater than 1. For example, Max = 2, Min
= 0. Max default is  1 , Min default is 0.


  • If you want no initial selection, set the Max and Min properties to enable multiple
    selection, i.e., Max - Min > 1, and then set the Value property to an empty
    matrix [].

  • If the list box is not large enough to display all list entries, you can set the
    ListBoxTop property to the index of the item you want to appear at the top when the
    component is created.

  • If you want to set the position or size of the component to an exact value, then modify
    its Position property. See “Locate and Move Components” on page 6-74and
    “Resize GUIDE UI Components” on page 6-67 for details.


NoteThe list box does not provide for a label. Use a “Static Text” on page 6- 34
component to label the list box.

Toggle Button


To create a toggle button with label Left/Right Tile, as shown in this figure:

Free download pdf