如何在FMX中动态创建带有圆角的trectangle? 我知道这很简单,但是我只是不知道为什么我的trectangle没有圆角。 这是我的代码: var box2:= trectangle.create(application); box2.parent:= form1; box2.position.x ...

问题描述 投票:0回答:1

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';

这就是外观:

这就是我需要它的外观:

TRectangle in Delphi

为了使圆角显示出来的代码,我缺少什么? TRectangle in Delphi 花了一点时间来弄清楚这个问题,事实证明这是一个错别字!

您有以下行。 看到什么错了吗?

Box2.XRadius := 10; Box2.XRadius := 10;

ther ther the the x!
delphi firemonkey rounded-corners delphi-12-athens
1个回答
0
投票

最新问题
© www.soinside.com 2019 - 2025. All rights reserved.