MATLAB Creating Graphical User Interfaces

(Barry) #1
Adjust Programmatic UI Layouts Interactively

When you execute the statement, first getrect executes to let you set a position using
rbbox. When you release the mouse button, the uisetcolor dialog opens for you to
specify a background color.


Set Font Characteristics Interactively


The uisetfont dialog gives you access to the characteristics of all fonts on your system.
Use it to set font characteristics for any component that displays text. It returns a
structure containing data that describes the property values you chose.


FontData = uisetfont(object_handle)


FontData =
FontName: 'Arial'
FontWeight: 'bold'
FontAngle: 'normal'
FontSize: 10
FontUnits: 'points'
uisetfont returns all font characteristics at once. You cannot omit any of them unless
you delete a field from the structure. You can use uisetfont when creating a component
that has a String property. You can also specify the string itself at the same time by

Free download pdf