SWT ScrolledComposite切断信息. [英] SWT ScrolledComposite cutting off information.

查看:69
本文介绍了SWT ScrolledComposite切断信息.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在制作一个应用程序,该应用程序具有从数据库存根(将成为Oracle数据库)返回的许多行数据,并且由于某种原因,滚动条停在第500个元素处.我想知道是否有所有元素都可以在滚动条中显示.

I'm making an application that has many lines of data coming back from a Database stub(which will become an Oracle database), and for some reason the scroll bar stops at about the 500th element. I'm wondering if there's anyway to have all the elements show within the scroll bar.

推荐答案

在这里我假设您使用的是Windows,因为Windows上的滚动条存在一个相当普遍的问题:最大值是short int,即32,768.因此,如果ScrolledComposite的内部合成的高度大于32,768像素,则合成将被剪切.

I'm assuming here that you're using Windows, because there is a fairly general problem with scrollbars on Windows: the maximum value is a short int, 32,768. Therefore, if the height of the inner composite of a ScrolledComposite is greater than 32,768 pixels, the composite will be clipped.

我还没有找到解决此问题的可靠方法,但是有一种解决方法:将滚动条与要滚动的组合分开.您无法创建ScrollBar,但可以制作一个与ScrollBar一样宽的ScrolledComposite,然后将ScrollListener附加到它上,并让它调整滚动合成的布局位置.

I haven't found a robust way of fixing this, but there is a workaround: separate the scrollbar from the composite that you wish to scroll. You can't create a ScrollBar, but you can make a ScrolledComposite that is precisely as wide as a ScrollBar, then attach a ScrollListener to it and have it adjust the layout position of the scrolling composite.

我在某个地方有一个摘要,但是我甚至不确定该诊断是否适用于您的情况.

Somewhere I have a snippet, but I'm not even exactly sure if this diagnosis applies to your scenario.

这篇关于SWT ScrolledComposite切断信息.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆