Delphi Form Designer II

Source: Internet
Author: User
Select component 1, select a single component

To select a single component, click on it. When you select a component, the eight black size tags appear around the component to prompt that it has been selected. :

When selecting componentsObject inspectorThe properties and events of the selected control are displayed. To cancel the selection, click the background of the form or SHIFT + Click the control to cancel the selection.

Tip

Each component has a corresponding default event handler. When you double-click a component on the form, code editor displays the default event handler of the component to prepare for the input code. In most cases, the default event handler isOnclickProcessing Program. What happens when you double-click a component depends on how the component is designed.

2. select a group of Parts

You can also select multiple components and think of them as a group. There are three methods to achieve this:

  • Shift + click with keyboard and mouse
  • Drag with the mouse
  • Select 【Edit | select all] Or Ctrl + A, all components on the form are selected.
3. Use SHIFT + Click to select components

Use SHIFT + Click to select a widget, select a widget, press and hold the Shift key on the keyboard, and click on any other widgets you want to include in the selection. Each of the clicked controls has four gray borders, prompting that it is part of the selection.
Hold down the Shift key and click the component to cancel the control from the selection.

For example, start the empty form first:

(1) place any three buttons on the form. They are automatically numbered as button1, button2, and button3;
(2) Click button1, and eight small black rectangles appear around the button1 control, as shown in


(3) press shift on the keyboard and click button2 to add it to the selection. A gray box appears on the corners of button1 and button2, for example:


(4) Shift + Click on button3. Select all three buttons, for example:


(5) Shift + Click on button2. button2 is deleted from the selection (the gray box disappears). button1 and button3 are still being selected, for example:


(6) Shift + Click on button1. button3 is the only component in the selection. The gray box is changed to eight black rectangular boxes, for example:


(7) Shift + Click on button1 and button2. All three buttons are in the selected part, for example:

Note

If you click on a selected component, nothing will happen. To select a single control in the current group, you must first click the form background or Press ESC to delete the group selection. Click on a single control you want to select.

4. Drag to select multiple components.

You can drag to select multiple controls around the control boundary rectangle to be selected.Bounding rectangle)The edges are ant lines, which can be changed when being dragged. In fact, you do not need to drag the border rectangle around the component. To make the component include in the selection, you only need to contact the border rectangle to select it, as shown in:

At the beginning, you must place the mouse cursor on the background of the form rather than on the component. Hold down the left mouse button and start dragging.Boundary rectangle. Release the left mouse button around or when you are exposed to the selected component. Any component in the boundary rectangle is included in the selection.

After you select a group of controls, you can use the SHIFT + Click technology described earlier to add other controls to the selection, or delete the control from the selection.

5. Select multiple items: components in the component

You often need to put components in other components. Panel components are often used as containers of other components. To select a group of items on the panel, you must drag the component and press Ctrl.

 

Mobile Components

It is very easy to move a widget. Move the mouse over the widget and drag it. When dragging, it indicates that the widget's rectangle moves with the mouse cursor. When you place the rectangle at the desired position, release the mouse button and move the component to the desired position.

Note

When the move control is released by dragging, the left and top attributes of the control are automatically updated. When you move the widget, you will see a tooltip message under the mouse and cursor. The tooltip information displays the new left and top information of the component when the drag is stopped.

When you drag the widget to set the size of the widget, a similar message is displayed, showing the new height and width information.

Note

It is easiest to release a mobile component by dragging it. If you need better control, you can change the left and top attributes of the component in the object inspector. You can also use various alignment options.

If the snap to grid option is on, drag the rectangle to the nearest coordinate grid point.

Tip

If you change your mind when dragging, Press ESC on the keyboard before releasing the mouse to cancel the operation, and the component will return to its original position.

The same is true for dragging a group of Widgets. After selecting a group of widgets, place the mouse cursor on any widget and start dragging. Each widget of the widget is displayed with a drag rectangle. This allows you to imagine where to place the mouse button.

Note

If the selected group has different parent controls, the components cannot be moved. For example, a button component is selected in the main form and a SpeedButton component is selected in the Panel. Because the two components have different parent controls, they cannot be moved as a group.

Tip

When the control is selected, press Ctrl on the keyboard to move one pixel at a time with the upper and lower right keys. This technology is effective for control groups and individual controls. The snap to grid feature is ignored when this technology is used. After moving the component in this way, the component is no longer located on the coordinate grid-there are some offsets. If you drag the component, it retains the offset from the coordinate grid point when you drag the component. If you drag the component, it retains the offset from the coordinate grid point when you drag the component.

Tip

If you use Ctrl + arrow to move the control and want to align it with the coordinate grid, you can choose 【Position | align to Grid], The upper left corner of the control will jump to the nearest coordinate grid point.
The Drag Control cannot drag its parent window. If you drag a widget to the left or top of the form, the widget is cut to the edge of the form; if you drag a widget to the right or bottom of the form and release it, a scroll bar appears on the form. You can scroll through the rest of the form. The width and height attributes of the form are not changed. If you drag the widget back to the visible part of the form, the scroll bar is canceled. This is the default feature of form. It will happen if the autoscroll attribute of the form is not changed to false. For example, the memo component that is dragged out of the right boundary of the form is displayed. Note that the scroll bar appears at the lower end of the form.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.