User`s guide

11 Lay Out a Programmatic GUI
Generate Code to Set Component Properties
The techniques described in the preceding s ections set properties of
components interactively. However, you still need to create code in your GUI
code file to enter the property values. The usual way to obtain the prope rty
values is by typing a
get command, such as:
get(object_handle,'String')
ans =
'Generate Dat a'
Then copy the string get returned and paste it into a set statement you have
partially typed in your GUI code f ile:
set(object_handle,'String', 'Generate Data')
You can automate this process by running a helper function that generates
set commands for components, propertie s, and values that you specify as
arguments. You can find the function, called
setprop, in th e folder in the
11-64