H houfuzhu1982 Unregistered / Unconfirmed GUEST, unregistred user! 2006-10-16 #1 我想要建一个属性组,就像一个加号点开,下面可以列出很多 属性项。但不知道要怎么写,请大侠指点一下。就剩下六分了,请多包含
H houfuzhu1982 Unregistered / Unconfirmed GUEST, unregistred user! 2006-10-16 #3 具体怎么写,有没有样子,发一个出来看一下,谢谢
T Tell_me_why Unregistered / Unconfirmed GUEST, unregistred user! 2006-10-16 #4 如果只是需要True,False的组比较简单 type TAnchorKind = (akLeft, akTop, akRight, akBottom); TAnchors = set of TAnchorKind; ... property ach:TAnchors read Fach write Fach; 如果要使用其他数据的比较麻烦要申明一个Class type Tak=class(TPersistent) ... property shuxing1:integer read Fshuxing1 write Fshuxing1; property shuxing2:string read Fshuxing2 write Fshuxing2; end; ... property ak:tak read fak write setak;
如果只是需要True,False的组比较简单 type TAnchorKind = (akLeft, akTop, akRight, akBottom); TAnchors = set of TAnchorKind; ... property ach:TAnchors read Fach write Fach; 如果要使用其他数据的比较麻烦要申明一个Class type Tak=class(TPersistent) ... property shuxing1:integer read Fshuxing1 write Fshuxing1; property shuxing2:string read Fshuxing2 write Fshuxing2; end; ... property ak:tak read fak write setak;
H houfuzhu1982 Unregistered / Unconfirmed GUEST, unregistred user! 2006-10-16 #5 怎么点开那个加号,里面的属性是空的,我在里面写了一个属性啦
唐 唐佐平 Unregistered / Unconfirmed GUEST, unregistred user! 2006-10-16 #7 type TVisibleAct=(vaInsert, vaEdit, vaDelete, vaRefresh, vaFirst, vaPrior, vaNext, vaLast, vaExport, vaShenhe, vaFuhe, vaHezhun); TVisibleActs = set of TVisibleAct; …… published { Published declarations } //数据集权限 property VisibleActs: TVisibleActs read FVisibleActs write FVisibleActs; end; 以上供参考,是给控件增加属性组
type TVisibleAct=(vaInsert, vaEdit, vaDelete, vaRefresh, vaFirst, vaPrior, vaNext, vaLast, vaExport, vaShenhe, vaFuhe, vaHezhun); TVisibleActs = set of TVisibleAct; …… published { Published declarations } //数据集权限 property VisibleActs: TVisibleActs read FVisibleActs write FVisibleActs; end; 以上供参考,是给控件增加属性组
T Tell_me_why Unregistered / Unconfirmed GUEST, unregistred user! 2006-10-17 #8 还没结贴? 在控件的create事件里先创建一下,+号就可以点开了 public constructor Create(AOwner: Tcontrol);overwrite; ... constructor Tak.Create(AOwner: Tcontrol); begin inherited Create(AOwner); fak :=Tak.create; end;
还没结贴? 在控件的create事件里先创建一下,+号就可以点开了 public constructor Create(AOwner: Tcontrol);overwrite; ... constructor Tak.Create(AOwner: Tcontrol); begin inherited Create(AOwner); fak :=Tak.create; end;