We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 9 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(3)
似乎为时已晚,但我知道 Angus 网站 上有一个免费的。(“绘图对象” )。 (我误解了你需要的是非直切形式,例如 TRzShapeForm 来自您的问题。)
抱歉。
(来源: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.
(source: angusj.com)
这里有很多可能性,其中之一是实现您自己的组件,从
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 theRealign
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.
我购买了 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