tailieunhanh - MASTERING DELPHI 6 phần 3

Nhược điểm là nếu bạn phát hành ứng dụng của bạn, những phông chữ có thể không có sẵn trên các máy tính người dùng của bạn. Nếu chương trình của bạn sử dụng một phông chữ mà người sử dụng của bạn không có, Windows sẽ chọn một số font khác để sử dụng trong vị trí của nó. | TControl and Derived Classes 209 When you set a font either by entering values for the attributes of the property in the Object Inspector or by using the standard font selection dialog box you can choose one of the fonts installed in the system. The fact that Delphi allows you to use all the fonts installed on your system has both advantages and drawbacks. The main advantage is that if you have a number of nice fonts installed your program can use any of them. The drawback is that if you distribute your application these fonts might not be available on your users computers. If your program uses a font that your user doesn t have Windows will select some other font to use in its place. A program s carefully formatted output can be ruined by the font substitution. For this reason you should probably rely only on standard Windows fonts such as MS Sans Serif System Arial Times New Roman and so on . Colors There are various ways to set the value of a color. The type of this property is TColor. For properties of this type you can choose a value from a series of predefined name constants or enter a value directly. The constants for colors include clBlue clSilver clWhite clGreen clRed and many others. Tip Delphi 6 adds four new standard colors clMoneyGreen clSkyBlue clCream and clMedGray As a better alternative you can use one of the colors used by the system to denote the status of given elements. These sets of colors are different in VCL and CLX. VCL includes predefined Windows colors such as the background of a window clWindow the color of the text of a highlighted menu clHightlightText the active caption clActiveCaption and the ubiquitous button face color clBtnFace . CLX includes a different and incompatible set of system colors including clBackground which is the standard color of a form clBase used by edit boxes and other visual controls clActiveForeground the foreground color for active controls and clDisabledBase the background color for disabled text controls. .

TỪ KHÓA LIÊN QUAN