to 蒋劲刚
const const1=5;
type
c=class(TCustomControl);
B=class(C);
A=class(TCustomControl)
private
sCaption:C;
sText:B;
protected
procedure paint;
public
constructor create(AOwner:TComponent);
end;
...
constructor A.Create(AOwner:TComponent);
begin
sCaption:=C.Create(Self);
sText:=B.Create(Self);
sCaption.Parent:=Self;
sText.Parent:=Self;
sCaption.Left:=Left;
sCatpion.Top:=Top;
sText.Left:=Left+const1;
sText.Top:=Top;
end;
procedure A.paint;
begin
sCaption.PaintTo(Self.Canvas,Left,Top);
sText.PaintTo(Self.Canvas,Left,Top);
end;
我想问一下为什么只画出了sText的文本内容;而sCaption的文本没有画出来;怎么样可以让两者都画出来而不闪呢