MATLAB SIMULINK 7 - GRAPHICAL USER INTERFACE Guía de usuario Pagina 554

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 759
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 553
11 Lay Out a Programmatic GUI
for the current value of the property, or '' for an invalid
property nam e.
setstr = setprop(objhandle,prop erty,value) returns a SET
command for the specified value of the propert y, or '' for
an invalid property name or value. If prop erty is empty,
the listbox GUI opens to le t you choose a property name.
The value can be a string, scalar, vector, cell array, HG
handle or function handle. Properties consisti ng of structs
or objects are disregarded and return '' ( empt y).
If you call se tpro p with no input arguments, it prompts you to select a
component or other graphic o bject. Click to select the object you want to
set and press Enter. You then select a property of the object from a dialog
box and a set string with its value is returned. When you select an object
interactively in this way,
setprop has no knowledge of its variable nam e.
Therefore, it returns a generic variable name, which is:
The
Style of a uicontrol object (e.g., “slider” or “text”)
The
Type of an object having no Style property, (e.g., “figure” or “axes”)
You should replace the generic name with the variable name of its handle
after pasting the set string into your code file.
Here is the output of
setprop for a String property:
setprop(object_handle,'String')
ans =
set(object_handle,'String','Generat e Data')
Youcanassignastringinthecalltosetprop. To create multiline strings,
use a cell array. F or example:
setstr = setprop(object_handle,'st ring',{'eggs','milk','fl our','sugar'})
setstr =
set(object_handle,'String',{'eggs', 'milk','flour','sugar'})
You can abbreviate property names as long as you make them unique. For
example, obtain a
Position property set string:
11-66
Vista de pagina 553
1 2 ... 549 550 551 552 553 554 555 556 557 558 559 ... 758 759

Comentarios a estos manuales

Sin comentarios