Chinaunix首页 | 论坛 | 博客
  • 博客访问: 212884
  • 博文数量: 123
  • 博客积分: 3066
  • 博客等级: 中校
  • 技术积分: 1920
  • 用 户 组: 普通用户
  • 注册时间: 2007-08-23 21:22
文章分类

全部博文(123)

文章存档

2012年(1)

2010年(1)

2009年(48)

2008年(73)

我的朋友

分类:

2009-06-26 11:22:41

Contents

 

procedure Register;
begin
  RegisterComponents('Samples', [TGraph]);
end;
 
Registers a set of components so that they all appear on the same page of the component palette.
Unit
Classes
Category
component registration routines
Delphi syntax:
procedure RegisterComponents(const Page: string; const ComponentClasses: array of TComponentClass);
C++ syntax:
extern PACKAGE void __fastcall RegisterComponents(const AnsiString Page, System::TMetaClass* const * ComponentClasses, const int ComponentClasses_Size);
Description
Call RegisterComponents to install a set of components in the IDE. Once a component is registered, it appears on the component palette, where it can be selected and placed on forms or data modules. Registered components can communicate with the Object Inspector to allow the user to get and set properties and events.
Set the Page parameter to the name of the page on the component palette where the components should appear. If the named page already exists, the components are added to that page. If the named page does not exist, a new palette page with that name is created.
Pass the components to be registered in the ComponentClasses parameter.
In C++, the ComponentClasses_Size parameter indicates the index of the last class in the ComponentClasses array (one less than the number of classes).
Call RegisterComponents from the implementation of the Register procedure in one of the units that defines the custom components. The units that define the components must then be compiled into a package and the package must be installed before the custom components appear in the component palette.
Note: After components are registered, users can move them to different palette pages. Once this happens, the component always appears on the new page. Calling RegisterComponents a second time does not influence the page on which the component appears.
阅读(846) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~