Timage和TLable组合控件的问题?
我想用image和lable做一个图片按钮
但是lable的文字却不显示。这是为什么?
constructor TImageButton.Create(AOwner: TComponent);var lb: TLabel;begin inherited Create(AOwner); FPictureDown := TPicture.Create; FPictureHot := TPicture.Create; FPictureDisable := TPicture.Create; FPictureNormal := TPicture.Create; lb := TLabel.Create(nil); lb.Width := Width; lb.Height := Height; lb.Top := Top; lb.Left := Left; lb.Parent := GetParentForm(Self); lb.Caption := 'aaaaa'; //设置了caption的,创建后却什么都没有 lb.BringToFront; Invalidate;end;