我编写了一个程序,用户可以用来绘制形状,将实际的按钮和其他工具放在窗体上,并使它们活动。但是,我注意到在这个表单上的TButton和设计模式下的表单的TButton有很大的不同。请看下面的图片。
这个按钮来自我的程序,在图像下面是我如何在这个表单上创建这个按钮的:

constructor TMakerButton.Create(r:TRect;form:TForm);
begin
inherited Create(r,form);
myType := totButton;
name := 'Button';
caption := 'Button';
lines := TStringList.Create;
lines.Clear;
button := TButton.Create(form);
button.Parent := form;
button.caption := string(caption);
button.Tag := LongInt(Self);
if form is TMakerFrm then
begin
button.Enabled := false;
end;
button.OnClick := ButtonClick;
button.OnMouseMove := ButtonMove;
myControl := button;
with bounds do
button.SetBounds(left,top,right-left,bottom-top);
end;以下是delphi编译器设计模式下的一个TButton。看看它看起来是怎样的3d与它抛光的玻璃外观:

有趣的是,我的程序按钮和delphi编译器的基类是TButton,那么,为什么它们看起来如此不同,以及如何使我的按钮看起来一样呢?
发布于 2017-06-02 15:06:49
按钮是禁用的。这应该是不同外观的原因。
https://stackoverflow.com/questions/44331102
复制相似问题