Condividi tramite


CREATE LABEL Command

Opens the Label Designer to create a label in standard label format or to design a custom label.

CREATE LABEL [FileName | ?] [NOWAIT] [SAVE] [WINDOW WindowName1]
   [IN [WINDOW] WindowName2 | IN SCREEN] [PROTECTED]

Parameters

  • [ FileName| ?]
    Specifies a file name for the label or displays the Create dialog box so you can type the name of the label file to create. The default file name extension for labels is .lbx.

    Note

    Calling CREATE LABEL without arguments opens the Label Designer and assigns the label file with the default name of LabelVersionNumber. When you close the Label Designer, Visual FoxPro prompts you to save changes to the label and provide a different name.

  • [NOWAIT]
    Continues program execution after the Label Designer opens. The program does not wait for the Label Designer to close but continues program execution on the immediate following line. If you omit NOWAIT, the Label Designer opens, and program execution pauses until the Label Designer closes.

    When calling CREATE LABEL with NOWAIT in the Command window, NOWAIT has no effect.

  • [SAVE]
    Specifies that the Label Designer remain open after activating another window. If you omit SAVE, the Label Designer closes when you activate another window.

    When calling CREATE LABEL with SAVE in the Command window, SAVE has no effect.

  • [WINDOW WindowName1]
    Specifies a window whose characteristics the Label Designer inherit.

    For example, if the window specified was created with the FLOAT option of DEFINE WINDOW, you can move the Label Designer. The specified window must be defined, but it does not need to be active or visible.

    Note

    The Label Designer has a default size that can be larger than the specified window. In this case, the Label Designer still inherits the characteristics of the window with the upper-left corner of the Label Designer placed at the same coordinates as the upper-left corner of the specified window but extends beyond the specified window's borders.

  • [IN [WINDOW] WindowName2| IN SCREEN]
    Specifies to open the Label Designer in a parent window or in the main Visual FoxPro window after placing the Label Designer in a parent window. The Label Designer does not assume the characteristics of the parent window and cannot move outside the parent window. If the parent window is moved, the Label Designer moves with it.

    Note

    You must first define the parent window using DEFINE WINDOW and make it visible for access by the Label Designer.

  • [PROTECTED]
    This clause is ignored by the Label Designer by default, because a newly created label layout will not have any protection flags set. However, a report builder can be written to take specific action if this clause is present in the collection of command line parameters. For example, the default Report Builder respects this clause by hiding the Protection tab of the Report Properties dialog box. See Understanding Report Builder Events for more information.

Remarks

You can also create labels using a wizard. For more information, see How to: Create Labels.

See Also

Reference

Label Designer

LABEL Command

MODIFY LABEL Command

Other Resources

Working with Reports

Commands (Visual FoxPro)