Partager via


Draw a control in your project

User interface controls such as buttons and textboxes enable your application to respond to user input.

To draw a system control

  1. In the Tools panel, select a control.

    ConseilConseil

    To view all the tools in a tool container, right-click the tool that is visible in the Tools panel.

    JJ170271.72fa303a-da86-4aed-8920-1b116769024a(fr-fr,VS.110).png

    ConseilConseil

    To view all the available controls, click Assets JJ170271.0d8b8d29-1af9-418f-8741-be3097d76eab(fr-fr,VS.110).png in the Tools panel. After you select a tool in the Assets panel, it will appear underneath the Assets button in the Tools panel.

  2. On the artboard, draw the control by dragging with the mouse. The result will depend on the type of control that you draw.

    • After you draw a text control, the resulting object enters text-editing mode so that you can change the content that is displayed in the object.

      JJ170271.9a094de5-242d-4a64-9541-5d1babf34d17(fr-fr,VS.110).png

      To exit text-editing mode, press ESC. After you exit text-editing mode, translation handles appear that you can use to scale, rotate, or move the object or perform other actions. To enter text-editing mode again, select the object by using the Selection tool JJ170271.2ff91340-477e-4efa-a0f7-af20851e4daa(fr-fr,VS.110).png, and then press F2.

      [!REMARQUE]

      For more information about how to format text, see Format text.

    • After drawing a nontext control, translation handles appear around the resulting object. By using these handles, you can scale, rotate, move, skew, and perform other actions. The mouse pointer changes to indicate which action you can do, shown as follows.

      JJ170271.7018bff7-57de-4616-8908-4dbc9be4721b(fr-fr,VS.110).png

      If the control displays text, such as the content of a Button control or CheckBox control, you can quickly change the text by pressing F2 to enter text-editing mode. To exit text-editing mode, press ESC.

  3. Save your work (Ctrl+S).

Now that you have a control in your project, you can try these next steps:

Voir aussi

Tâches

Create a new user control in your project