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

Source: Internet
Author: User interface and font selection of Chinese characters
If you have a Chinese system installed in your WINDOWS95 system, it is extremely convenient to make the interface Chinese. For example, you can change the Button1 caption property to a "&r rectangle", which also changes the properties of other parts to make the form an operational interface for Chinese.

If you are not satisfied with the Chinese or Western text, you can adjust the Font property to suit your requirements. The Font property is preceded by a small "+" number, which indicates that it represents a set property, or that the property is no longer a single value, but a collection of attributes. Double-click the Font,object inspector to expand the other properties that display it below. Color is used to represent the colors of text, and name defines the font name, such as system,msserif,arial, Arial, boldface, and so on. The style also has four attributes: Fsbold,fsitalic,fsunderline and Fstrikeout. If you want a font to have one of these styles, set the corresponding property value to True.

The Font dialog box allows you to set the above properties more directly. The right value segment of the Font property has a button with an ellipsis, which you can click to activate the Font dialog box, as shown in Figure 1.7:

This dialog box contains all of the above properties, making it more direct and convenient to adjust the glyphs. But to be clear, for form forms, the Font property changes the display style of other parts of the form, and its own title font is the default system font and cannot be changed by attributes. using the Graphical editing dialog box

Finally, we use the icon button BITBTN1 to control the color of the shape part. Select the icon button to change its Caption property to "&color" (or "&c color"). You can add an icon to the button to describe its function graphically. Select the Glyph attribute in Object Inspector, click the three-point button of the value segment to eject the Graphics Edit dialog box.

You can mount the icon through the Graphical Editing dialog box, and in this routine, press the Load button, select \delphi 2.0\images\buttons\brush.bmp file mount, and Bitbtn1 become an icon button. In addition, Delphi provides you with a rich Windows standard icon button. To use them, change the kind properties of bitbtn. Users may want to try, choose other values can produce beautiful standard buttons, such as Ok,cancel and so on. This allows you to benefit from future program development.

At this point, the interface design work has been completed. Run the observation, don't forget to save your library unit files, engineering files.

1.2.5 Write Event handling procedures

Complete the user interface, just create a "skeleton", the next thing to do is to add "soul" to the program, that is, so that it can complete the required functions.

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: 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.