Editing Dialog Elements

#### Search Results

Search

# Editing Dialog Elements

To edit one or several dialog elements as a whole, you can use the entries provided in the Edit menu. These entries enable you to reuse dialog elements for similar contexts instead of creating them from scratch.

The following topics are covered below:

- Cutting a Dialog Element

- Copying a Dialog Element

- Pasting a Dialog Element from the Clipboard

- Deleting a Dialog Element

- Selecting all Dialog Elements with the same Parent in a Dialog

- Editing a Dialog Element's Attributes

- Editing a Dialog Element's Event Handlers

- Unifying the Size of Several Dialog Elements

- Aligning the Position of Several Dialog Elements

- Unifying the Spacing Between Several Dialog Elements

- Stretching a Dialog Element

## Cutting a Dialog Element

To cut a dialog element

1. Select the dialog element.

2. From the Edit menu or from the dialog element's context menu, choose Cut.

   Or:
   Select the "Cut" toolbar button.

   Or:
   Press SHIFT+DEL or CTRL+X.

   The selected dialog element and any of its child dialog elements is cut to the clipboard for pasting elsewhere, for example into other dialogs.

Note
You can also select several or all dialog elements in a dialog and cut them all at once.

## Copying a Dialog Element

To copy a dialog element

1. Select the dialog element.

2. From the Edit menu or from the dialog element's context menu, choose Copy.

   Or:
   Select the "Copy" toolbar button.

   Or:
   Press CTRL+INS or CTRL+C.

   The selected dialog element is copied to the clipboard for pasting elsewhere. If the selected dialog element has child dialog elements you will be prompted as to whether these should also be copied or not.

Note
You can also select several or all dialog elements in a dialog and copy them all at once.

## Pasting a Dialog Element from the Clipboard

To paste a dialog element from the clipboard

- From the Edit menu or from the dialog element's context menu, choose Paste.

  Or:
  Select the "Paste" toolbar button.

  Or:
  Press SHIFT+INS or CTRL+V.

  The dialog element in the clipboard is pasted into the current container in the current dialog. The current container is the lowest level dialog element containing the selected dialog elements which is not the selected dialog element itself. If you are pasting a dialog element back into the same container from which it was copied, the original dialog element is overlaid by the copy. You then have to move the pasted dialog element to its new location. (The pasted dialog element is preselected by default.) Note that if it is desired to paste dialog elements into an empty container, a dummy child dialog element must be created and selected first.

Note
You can paste several or all dialog elements in a dialog if you have cut or copied them to the clipboard at once.

## Deleting a Dialog Element

To delete a dialog element

1. Select the dialog element.

2. From the Edit menu or from the dialog element's context menu, choose Delete.

   Or:
   Select the "Delete" toolbar button.

   Or:
   Press DEL.

   A dialog box appears asking you to confirm the deletion.

3. Choose Yes.

   The selected dialog element is deleted, together with any of its child dialog elements.

Note
You can also select several or all dialog elements in a dialog and delete them all at once.

## Selecting all Dialog Elements with the same Parent in a Dialog

To select all dialog elements in a dialog

- From the Edit menu or from the dialog element's context menu, choose Select all.

  If a dialog element is selected, all unselected dialog elements with the same parent become selected. If no dialog element is selected, all top-level dialog elements become selected.

## Editing a Dialog Element's Attributes

To edit a dialog element's attributes

1. Select the dialog element.

2. From the Control menu or from the dialog element's context menu, choose Attributes.

   Or:
   Double-click on the dialog element.

   Or:
   Press ENTER.

   The dialog element's attributes window appears. To find out what the entries in the attributes window mean, choose "Help". For context-sensitive help, select the attribute entry and press F1.

3. Enter the desired attribute values.

4. Choose OK to confirm your changes.

## Editing a Dialog Element's Event Handlers

To edit a dialog element's event handlers

1. Select the dialog element.

2. From the Control menu or from the dialog element's context menu, choose Event handlers.

   Or:
   Press SHIFT+ENTER.

   The dialog element's event handler section appears.

3. Select the event (such as click or double-click).

4. To view the event parameters of an ActiveX control, select the Event Info button.

5. Enter the desired event code in free form, either directly in the window itself or by using the Program Editor by selecting the Editor push button, then closing the window with the OK push button.

   Or:
   Choose "Use" to enter a user-defined event.

   This code will be executed when the event occurs for the dialog element. Note that if you have specified code in the before-any and after-any event sections, this will be triggered before and after the code entered in Step 4. So if you need common event code, you only have to enter it once in your dialog's before-any and after-any event section.

6. Choose OK to save your code.

## Unifying the Size of Several Dialog Elements

To unify the size of several dialog elements

1. Select all dialog elements whose size is to be unified.

2. Select the dialog element that has the reference width or height.

3. From the Control menu, choose either Unify size > Width or Unify size > Height.

   The dialog elements are aligned to the width or height of the reference dialog element.

## Aligning the Position of Several Dialog Elements

To align the position of several dialog elements

1. Select all dialog elements whose position is to be aligned.

2. Select the dialog element that has the reference position.

3. From the Control > Align position menu, choose one of the following commands: .

   Left
   Center (horizontal)
   Right
   Top
   Center (vertical)
   Bottom

   The dialog elements are aligned to the position of the reference dialog element.

## Unifying the Spacing Between Several Dialog Elements

To unify the spacing between several dialog elements

1. Select all dialog elements between which you want to unify spacing.

2. From the Control menu, choose either Unify spacing > Horizontal or Unify spacing > Vertical.

   The spaces between the dialog elements are now distributed evenly.

## Stretching a Dialog Element

To stretch a dialog element in a particular direction

1. Select the dialog element to be stretched.

2. From the Control menu, choose Stretch > direction, where direction is, for example, North west.

   A cursor appears indicating that you can stretch the dialog element.

3. Drag the cursor with the mouse until your dialog element has the desired size.

4. Use the left mouse button to fix the dialog element's size.

   The dialog element is now resized; as it is still selected, you can edit it further.

Note
You can also select several dialog elements and stretch them all at the same time.

### On this page

- Cutting a Dialog Element
- Copying a Dialog Element
- Pasting a Dialog Element from the Clipboard
- Deleting a Dialog Element
- Selecting all Dialog Elements with the same Parent in a Dialog
- Editing a Dialog Element's Attributes
- Editing a Dialog Element's Event Handlers
- Unifying the Size of Several Dialog Elements
- Aligning the Position of Several Dialog Elements
- Unifying the Spacing Between Several Dialog Elements
- Stretching a Dialog Element