这是个什么错误Unable to expand?
我想给控件加一个像font那样的属性。就是前面有个加号点开后里面可以填的。但是现在点开后会报错Unable to expand?用的是类
TPosition = class {************************************************方位结构类}
private
{ Private declarations }
FLeft: integer; //左起点
FTop: integer; //右起点
FWidth: integer; //长度
FHeight: integer; //高度
FAutoSize: Boolean; //自适应
protected
{ Protected declarations }
public
{ Public declarations }
//constructor Create;
//destructor Destroy(); override;
published
{ Published declarations }
property Left: integer read FLeft write FLeft;
property Top: integer read FTop write FTop;
property Width: integer read FWidth write FWidth;
property Height: integer read FHeight write FHeight;
property AutoSize: Boolean read FAutoSize write FAutoSize;
end;
constructor TPosition.Create;
begin
FLeft := 0;
FTop := 0;
FWidth := 0;
FHeight := 0;
FAutoSize := False;
end;
destructor TPosition.Destroy;
begin
inherited;
end;
......
FPicturePoistion: TPosition; //图片位置
......
property PicturePoistion: TPosition read FPicturePoistion write FPicturePoistion;
constructor TSpreadPanel.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
FPicture := TPicture.Create();
FPicturePoistion := TPosition.Create;
//初始化各值
Color := RGB(234, 247, 255);
DrawBorder := True;
BevelOuter := bvNone;
BorderColor := clBackground;
Repaint;
end;
destructor TSpreadPanel.Destroy;
begin
FPicture.Free;
FPicture := nil;
FPicturePoistion.Free;
FPicturePoistion := nil;
inherited;
end;
问题点数:80、回复次数:2Top
1 楼netfly(支点)回复于 2006-03-13 23:20:48 得分 50
TPosition = class (TPersistent)Top
2 楼Kevin_Lmx(繁华阅尽)回复于 2006-03-14 00:26:55 得分 30
类似于Font、Items等属性,必须使用属性编辑器(PropertyEditor),才能够产生对话框或者枚举列表。楼主可以查询PropertyEditor或者RegisterPropertyEditor,得到相关帮助,我相信这些资料应该随处可见。Top
相关问题
- 为什么会连接错误[Linker Fatal Error] Fatal: Unable to open file 'EHLIBB60.LIB'
- 什么错误???
- 什么错误?
- 什么错误???
- 什么错误?
- 什么错误
- 为什么出现"unable to load....-找不到指定的程序"这样的错误?
- 请教unable to allocate 8704 bytes of shared memory 是什么错误,如何改正?
- 小弟初学JBuilder,请问URL: Unable to open location: Socket is not connected: connect是什么错误啊?
- 小弟初学JBuilder,请问URL: Unable to open location: Socket is not connected: connect是什么错误啊?




