Looking for non-rectangular panel VCL component [closed]

家住魔仙堡 提交于 2019-12-24 19:23:09

问题


Sometimes I want L-shaped, T-shaped, triangular, polygonal ...

Free reusable component please . . .


回答1:


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)




回答2:


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.




回答3:


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



来源:https://stackoverflow.com/questions/2053958/looking-for-non-rectangular-panel-vcl-component

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!