在别人写的代码中,经常看到tag属性。
比如:Form3.tag:=0
不知道什么意思,望高手赐教,谢谢。

解决方案 »

  1.   

    一个integer属性,Delphi特意留的一个属性,让用户自由发挥
      

  2.   

    TAG可以当作是附加属性,常用来区分对象。至于具体用途可以根据自已需要灵活使用。也用以用它保存指针,这样TAG就可以与对象、结构等作一些关联。
      

  3.   

    看Delphi帮助,写的很清楚
    Stores an integer value as part of a component. 
    ...
    Tag has no predefined meaning. The Tag property is provided for the convenience of developers. It can be used for storing an additional integer value or it can be typecast to any 32-bit value such as a component reference or a pointer.
      

  4.   

    property Tag: Longint;DescriptionTag has no predefined meaning. The Tag property is provided for the convenience of developers. It can be used for storing an additional integer value or it can be typecast to any 32-bit value such as a component reference or a pointer.