Rename Objects

Use the Object Inspector or context menu to rename objects in your user interface design.

All objects that you include in your user interface design are listed by name in the Object Inspector. Choosing meaningful names can help you organize and manage objects as you develop your design. The object names are reflected in the code when you save your design as an OML file.
  1. Review the objects in your design.
    Note: The object names are not to be confused with labels, for example "Fast" and "Detailed," that you see in the example Qt Dialog. Labels are objects themselves and are listed in the Object Inspector.
  2. Change an object name with the following options:
    • Double-click an object in the Object Inspector and type in the desired name.
    • Right-click an object in the Qt Dialog or Object Inspector and select changeObjectname from the context menu, then type in the desired name in the microdialog.
    Note: Spaces and special characters are not allowed in object names.
    The example shows the name change for the Slider object from Slider to AnalysisType. Name changes are also reflected in the code when the design is saved as an OML file.
    AnalysisType = uicontrol('parent', DialogRunAnalysis, 'style','slider'...
        , 'max', 99 , 'min', 0 ...
        , 'value', 0 , 'sliderstep', [1 10]...
        , 'callbackdelay', 0 , 'orient','horizontal'...
        , 'callback','AnalysisType_callback', 'interruptible','off'...
        , 'enable','on'...
        , 'units','normalized', 'position',[0.22 0.41 0.55 0.07]...
        , 'backgroundcolor', [246 246 246]...
        , 'tag','', 'tooltipstring','', 'userdata', [], 'visible','on');