如何添加滚动条到TComponent?(How to add scrollbars to a TComponent?)
我使用的是来自TComponent后裔的第三方控件,我希望它具有滚动条,最好是自动滚动条。
我可以从TComponent中获得它们吗?
如果不这样做,我可以在我的mainform和组件上放置一个TPanel并获取滚动条? 我打算让组件(和面板,或其他)是alClient,以便它们在我的组件调整大小时自动调整大小,但我也想让它们具有(自动)滚动条。
I am using a 3rd party control which is descended from TComponent and I want it to have scrollbars, preferably autoscrollbars.
Can I get them from TComponent?
Failing that, can I place a TPanel on my mainform & the component on that and get scrollbars? I intend to have the component (and Panel, or whatever) be alClient so that they autoresize when my component resizes, but I woudl also like them to have (auto) scrollbars.
最满意答案
如果我明白你打算做什么,请这样做:
在窗体上添加一个TScrollBox 在TScrollBox组件上添加可视化组件 不要担心滚动条,因为它们会在需要时自动显示(当组件不在可见区域时) 玩的开心!If I understood what you're intended to do, do this:
add a TScrollBox on the form add visual components on the TScrollBox component don't worry about scroll bars, because they will be shown automatically when needed(when a component is out of the visible area) have fun!更多推荐
发布评论