如何给VCL组件添加属性页?请高手指点

解决方案 »

  1.   

    publish
         property   XXXXX:XXX;  read XXXX write XXX default X;
      

  2.   

    TSetMoney = class(TComponent)
       private
      { Private declarations }
          FUserChar: string;           //用户登录后分配的特征字
          FUserCode: integer;          //用户登录后代码
          FAddress: string;            //服务器地址
          FHost: string;               //服务器名称
          FConnectionString: string;   //服务器连接串
          FModuleName: string;         //模块名称
          FMainServer: string;         //数据库服务器
       protected
      { Protected declarations }
       public
      { Public declarations }
          constructor Create(AOwner: TComponent; aContainer: TWinControl; Attrs: TMoenyAttributes);
          destructor Destroy; override;
          function  GetSvr: OleVariant;       //获取数据库服务器
          function  ActivateForm(aOwner: TComponent; aContainer: TWinControl): TForm; //创建"设置外币"对象实例
          function  GetBWB: OleVariant;       // 获取本位币信息,币种代码<=100
          function  GetWB: OleVariant;        // 获取外币外币信息,币种代码>100
          function  GetYHXX: OleVariant;      //获取用户信息
          function  GetMoneyRate: OleVariant; //获取币种汇率
          function  GetTheMoneyRate(MoneyID: integer): OleVariant;//获取指定币种汇率
          function  GetNewMoneyID: integer;   //获取币种代码
          procedure PostMoneyData(cdsMoney, cdsMoneyRate: TClientDataSet);//提交数据
          function  GetStartTime: TDateTime;  //获取币种起始时间
          function  GetDBType: integer;       //获取数据库类型
          function  getcopysvr(CLSID:String):variant;    //连接服务器,进行同步复制
       published
      { Published declarations }
          property UserChar: string read FUserChar write FUserChar;
          property UserCode: integer read FUserCode write FUserCode;
          property Address: string read FAddress write FAddress;
          property Host: string read FHost write FHost;
          property ConnectionString: string read FConnectionString write FConnectionString;
          property ModuleName: string read FModuleName write FModuleName;
          property MainServer: string read FMainServer write FMainServer;
       end;
      

  3.   

    我说的是属性页,并非属性!就像ActiveX组件在IDE中鼠标右键菜单可以弹出属性页对话框一样,VCL怎么做到?