Chapter One introduction of-delphi (Iv.) (1)

Source: Internet
Author: User

1.3.4.2 Shape part
Graphic part shape in the previous article we have learned that it can handle a variety of geometric shapes, by setting pen and brush nested properties, you can set the shape of the border color, style and graphics styles, fill style, texture, and so on.

1.3.4.3 Paintbox Parts

There is also a paintbox (drawing box) part on the system page that provides you with a piece of area to draw on the form. This part needs to be programmed to implement its functions, a key attribute that is effective only at run time is canvas to complete the drawing. The Paintbox part cannot exist on the form alone, and must be placed in a fixed grouping part.

1.3.5 diagrams, file list parts

1.3.5.1 Outline Parts

The OutLine (sketch) widget is available on Win 3.1 pages for displaying hierarchical data, text. In Delphi, the sketch parts have a wide range of settings. Its Lines property allows you to set the text or data for each entry. Generally a space is equivalent to a level, if you add a space before the item indicates that it is in the next layer of the tree. Therefore, you cannot use the TAB key when you are editing a lines property. Use the lines and items properties to access the name, index, and full pathname of the sketch at programming time. The Outlinestyle property is used to configure the style of the diagram when it is displayed, and you can select the Indent mode with the icon next to it, or you can choose how to connect.

1.3.5.2 Directory Access widget

Delphi provides you with a powerful file directory Access widget. You can design a custom file dialog box for specific purposes. By selecting the System page on the Parts palette, you will find these parts, which are file list box FileListBox, directory list box Directorylistbox, Drive Drop-down list box drivecombobox and filtered drop-down list box Filtercombobox parts.

The File list box part FileListBox displays the files in the current directory, and the default setting is to display all files. By changing the Mask property to set the filter, you can apply DOS to the standard way of matching, and select the file name to display. When multiple filters are specified, use the ";" Separated.

The Directory list box part Directorylistbox displays the contents of the current drive, and allows users to switch directories while the program is executing. The column property determines how many columns are displayed in the window, and when the form space is not enough, displaying it in a few columns helps to display the catalog information in a comprehensive way. In Delphi, when the window space does not display all the information, will automatically add the rolling line, to facilitate the user's operation.

The Drive Drop-down list box Part Drivecombobox displays the current drive and allows the user to switch between drives while executing. As a programmer, when applying this part, consider fault tolerance and prompt processing when the user chooses to a nonexistent drive.

The Filtercombobox (Filtered drop-down file list box) widget displays the current file filter type, such as *.*,*.pas. Allows the user to select the type of file to display in the Drop-down list at execution time. When you initialize the Filter property, you get a drop-down list.

In addition to the above four components, on the sample page, Delphi also provides an outline of the catalog part directoryoutline. It displays the directory structure on the current disk as a multi-level sketch, and allows the user to switch the hierarchy of the directory at run time.

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.