滚动箱(TSCrollbox)中的最大组件数量
我已经开发了一个程序,该程序使用tscrollbox
组件来生产“铁路布局”。该路线由许多小数字组成,每个图形都代表了单个轨道(根据铁路建模的想法)。
我注意到,对于很少的数字,该软件毫无问题地工作。但是,进行了各种调试测试,已经有3500个二进制文件,它开始以一种异常的方式行事,并且有5000件零件偶然崩溃了!
我想指定该软件的第一个版本是在“ Windows XP Professional”环境中使用“ Delphi 5 Professional”开发的。我认为问题是少量的RAM(最大3GB),这不允许您分配超过一定数量的零件,尽管有一个粗略的估计,我也许可以将至少16000件分配。
然后,我尝试修改软件以使其适应“ Windows 8.1 Professional X64”环境中的“ Delphi Xe2”,生成64位代码,但是上述问题仍然存在。
在这一点上,我想知道是否要在tscrollbox
组件的可能限制中找到问题。是否可以在tscrollbox
上放置最大数量的组件?如果是这样,是否有任何方法可以克服这个问题?
I have developed a program that uses a TScrollBox
component to produce a "railway layout". This route is made up of many small figures, each of which represents a single segment of track (according to the idea of railway modeling).
I noticed that for quite small numbers, the software works without problems. But carrying out various debug tests, already with 3500 binaries, it starts to behave in an anomalous way, and with 5000 pieces the program crashes indecently!
I would like to specify that this first version of the software was developed with "Delphi 5 Professional", in the "Windows XP Professional" environment. I thought the problem was the small amount of RAM (3GB maximum), which does not allow you to allocate more than a certain number of pieces, although with a rough estimate I could perhaps have allocated at least 16000 pieces.
I then tried to modify the software to adapt it to "Delphi XE2", in the "Windows 8.1 Professional X64" environment, generating 64-bit code, but the problem described above still occurs.
At this point, I wonder if the problem is to be found in a possible limitation of the TScrollBox
component. Is there a maximum number of components that can be placed on the TScrollBox
? If so, is there any way to overcome this problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这不是TSCrollbox的限制,而是OS本身的限制。
因为您可能使用了TwinControl后代,因此您很可能要达到该限制。
It is not a limitation of the TScrollBox, but of the OS itself.
Since probably you're using TWinControl descendants, it is most likely you're reaching that limit.