Naming rules for component instances

zhaozj2021-02-16  56

6.6.2 Name Rule Components of Components Instances should have descriptive. Delphi does not specify the default name for the component. The unit name is naming to use a changed Hungary naming specification. In this standard, the component name includes two parts: prefix and nature identification name. 1. The prefix of the component's prefix components is a letter abbreviation that represents the type of components. For example, the component prefix in the table below. TBUTTON BTNTEDIT EDTTSPEEDBUTTON B T NTLISTBOX LSTBX As shown above, the component type prefix is ​​made up of component type names. The following rule illustrates how to define a component type prefix: 1) Remove the T preruption from the component type name. For example, TButton turns to Button. 2) In addition to the first vowel, delete all the vowel letters. For example, Button becomes BTTN, and Edit becomes an EDT. 3) Compress the double letter. For example, BTTN turns into btn. 4) If a conflict occurs, a vowel is added to a component prefix. For example, adding a vincar to BATN in the prefix of the TBUTTON component to distinguish between the prefix of TButton. 2. Component Nature Identification Name Components Nature ID Name is a description of component intentions. For example, a TBUTTON component for closing the form can be named btnclose. An edit box component of an editor can be named edtfirstname.

There is not much content but I still use it very useful, that is, you have already given these as well, you can also save him to make a memo (if you have no trouble). :)

转载请注明原文地址:https://www.9cbs.com/read-22727.html

New Post(0)