寻找非矩形面板VCL元件

发布于 2024-08-17 07:10:45 字数 1539 浏览 8 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

夜唯美灬不弃 2024-08-24 07:10:45

似乎为时已晚,但我知道 Angus 网站 上有一个免费的。(“绘图对象” )。 (我误解了你需要的是非直切形式,例如 TRzShapeForm 来自您的问题。)

抱歉。

angus 的绘图对象
(来源:angusj.com

It seemed to be too late, but I know a free one on the Angus's site.("Drawing Objects") . (I misunderstood what you need is like non-recutanglular form like TRzShapeForm from your question.)

Sorry.

angus's Drawing Objects
(source: angusj.com)

臻嫒无言 2024-08-24 07:10:45

这里有很多可能性,其中之一是实现您自己的组件,从 TPanel 派生并使用 a 区域来指定面板的区域,这可以通过调用Windows API 函数 CreatePolygonRgn。您可能必须手动重新对齐子控件。

如果您不需要面板包含任何子控件,则应考虑使用形状对象 (TShape),您可以使用现有对象的组合,或创建自己的对象。

另一种选择是使用常规面板,并在其上绘制形状作为背景。最简单的方法可能是实现您自己的 TPanel 类并处理绘制代码。这不会塑造面板的形状,但您可以模拟它的视觉特征。如果您需要子组件,您可能需要重写Realign函数以确保子组件保持在形状面板边界内。

或者,您必须在互联网上碰碰运气,找到实现此功能的第 3 方组件,我进行了快速搜索,但没有找到可以专门执行此操作的面板,尽管我必须承认我的搜索不太彻底,但您可能会有更好的运气比我。

There is a number of possibilities here, one of which is to implement your own component, derive from TPanel and use the a region to specify the area of the panel, this could be done by a call to the Windows API function CreatePolygonRgn. You would probably have to realign the child controls manually.

If you don't need the panel to contain any child controls, you should consider using shape objects (TShape) instead, you could use a combination of existing ones, or create your own.

One other option is to use regular panels, and draw the shape as background on them. The easiest way to do this might be to implement your own TPanel class and handle the paint code. This will not shape the panel, but you can simulate the visual features of it. If you need child components you might need to override the Realign function to make sure child components are kept within shaped panel boundaries.

Alternatively you have to try your luck on the internet finding 3rd party components that implements this, I did a quick search but found no panels that could do this specifically, although I must admit my search wasn't too thorough, you might have better luck than me.

从此见与不见 2024-08-24 07:10:45

我购买了 http://www.tmssoftware.com/site/products.asp? t=vclp 看起来它可以做我想要的事情(并提供源代码,以防它只能做我想要的 90%)

另请参阅 寻求平面图设计VCL工具栏

I purchased http://www.tmssoftware.com/site/products.asp?t=vclp which looks like it can do what I want (and provides source code in case it only does 90% of what I want)

See also Seeking floorplan design VCL toolbar

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文