胡
胡圖崇
Unregistered / Unconfirmed
GUEST, unregistred user!
控件MutilLabel有個Lines屬性是Tstrings類型的,安裝好MutilLabel之后,調用:MutilLabel1.Lines.Add('123');
然而就報錯:Abstract Error!
我只會控件開發的一些皮毛,這個不知道是什么錯誤,望高手捫指點指點咯
以下是MutilLabel的架構:
unit MutilLabel;
interface
uses
Windows, SysUtils, Classes, Controls, StdCtrls, Graphics, Forms, Messages;
type
TEdgeModal=(bvNone,bvLowered,bvRaised);
TMutilLabel = class(TCustomLabel)
private
{ Private declarations }
FLines:TStrings;
FBevelOut:TEdgeModal;
FBevelIn:TEdgeModal;
procedure SetLines(Const Value:TStrings);
procedure SetBevelOut(Const Value:TEdgeModal);
procedure SetBevelIn(const Value:TEdgeModal);
protected
{ Protected declarations }
procedure paint;virtual;
procedure WMPAINT(var Msg:TWMPAINT);message WM_PAINT;
public
{ Public declarations }
constructor Create(Aowner:Tcomponent);override;
Destructor Destroy;override;
published
{ Published declarations }
property Align;
property Alignment;
property Anchors;
property AutoSize;
property BiDiMode;
property BevelOut:TEdgeModal read FBevelOut write SetBevelOut;
property BevelIn:TEdgeModal read FBevelIn write SetBevelIn;
property Lines:TStrings read FLines write SetLines;
property Caption;
property Color ;
property Constraints;
property DragCursor;
property DragKind;
property DragMode;
property Enabled;
property FocusControl;
property Font;
property ParentBiDiMode;
property ParentColor;
property ParentFont;
property ParentShowHint;
property PopupMenu;
property ShowAccelChar;
property ShowHint;
property Transparent;
property Layout;
property Visible;
property WordWrap;
property OnClick;
property OnContextPopup;
property OnDblClick;
property OnDragDrop;
property OnDragOver;
property OnEndDock;
property OnEndDrag;
property OnMouseDown;
property OnMouseMove;
property OnMouseUp;
property OnMouseEnter;
property OnMouseLeave;
property OnStartDock;
property OnStartDrag;
end;
type
TMutilString=class(TStrings)
private
Pchar:Char;
MutilLabel:TMutilLabel;
Function GetBuffText:string;
Procedure SetBuffText(Text:string);
protected
Function Get(index:integer):string;override;
Function GetCount:integer;override;
Procedure Put(index:integer;Const s:string);override;
public
Procedure Clear;override;
procedure Delete(index:integer);override;
procedure Insert(index:integer;Const S:string);override;
end;
然而就報錯:Abstract Error!
我只會控件開發的一些皮毛,這個不知道是什么錯誤,望高手捫指點指點咯
以下是MutilLabel的架構:
unit MutilLabel;
interface
uses
Windows, SysUtils, Classes, Controls, StdCtrls, Graphics, Forms, Messages;
type
TEdgeModal=(bvNone,bvLowered,bvRaised);
TMutilLabel = class(TCustomLabel)
private
{ Private declarations }
FLines:TStrings;
FBevelOut:TEdgeModal;
FBevelIn:TEdgeModal;
procedure SetLines(Const Value:TStrings);
procedure SetBevelOut(Const Value:TEdgeModal);
procedure SetBevelIn(const Value:TEdgeModal);
protected
{ Protected declarations }
procedure paint;virtual;
procedure WMPAINT(var Msg:TWMPAINT);message WM_PAINT;
public
{ Public declarations }
constructor Create(Aowner:Tcomponent);override;
Destructor Destroy;override;
published
{ Published declarations }
property Align;
property Alignment;
property Anchors;
property AutoSize;
property BiDiMode;
property BevelOut:TEdgeModal read FBevelOut write SetBevelOut;
property BevelIn:TEdgeModal read FBevelIn write SetBevelIn;
property Lines:TStrings read FLines write SetLines;
property Caption;
property Color ;
property Constraints;
property DragCursor;
property DragKind;
property DragMode;
property Enabled;
property FocusControl;
property Font;
property ParentBiDiMode;
property ParentColor;
property ParentFont;
property ParentShowHint;
property PopupMenu;
property ShowAccelChar;
property ShowHint;
property Transparent;
property Layout;
property Visible;
property WordWrap;
property OnClick;
property OnContextPopup;
property OnDblClick;
property OnDragDrop;
property OnDragOver;
property OnEndDock;
property OnEndDrag;
property OnMouseDown;
property OnMouseMove;
property OnMouseUp;
property OnMouseEnter;
property OnMouseLeave;
property OnStartDock;
property OnStartDrag;
end;
type
TMutilString=class(TStrings)
private
Pchar:Char;
MutilLabel:TMutilLabel;
Function GetBuffText:string;
Procedure SetBuffText(Text:string);
protected
Function Get(index:integer):string;override;
Function GetCount:integer;override;
Procedure Put(index:integer;Const s:string);override;
public
Procedure Clear;override;
procedure Delete(index:integer);override;
procedure Insert(index:integer;Const S:string);override;
end;