var Box2 := TRectangle.Create(Application);
Box2.Parent := Form1;
Box2.Position.X := 300;
Box2.Position.Y := 256;
Box2.Width := 177;
Box2.Height := 50;
Box2.Stroke.Thickness := 10;
Box2.XRadius := 10;
Box2.XRadius := 10;
Box2.Name := 'Whatever2';
这就是我需要它的外观:
为了使圆角显示出来的代码,我缺少什么?
花了一点时间来弄清楚这个问题,事实证明这是一个错别字!
Box2.XRadius := 10;
Box2.XRadius := 10;