问题标签 [scrolledcomposite]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
java - TabFolder 中的 ScrolledCompsite 将内容大小为零
我有以下问题:
我正在SWT
为我的应用程序创建一个 GUI。我有一个TabFolder
,我在其中添加了几个TabItems
,并且在每一个中我创建了一个ScrolledComposite
包含一些内容的内容。
显示TabFolder
正常,但是ScrolledComposite
inTabFolder
仅在第一个中显示它的内容TabItem
。所有其他ScrolledComposites
人自己都可以看到,但它们的内容是不可见的。
这是一个小代码片段,演示了我所指的内容:
如果该区域被涂成红色,您可以判断内容正在显示。如果内容不可见,则该区域为蓝色(背景ScrolledComposite
)
我不确定这是否重要,但这发生在 Linux Mint 18 上,而且它似乎只发生在 GTK 3 中(在 2 中它工作得很好)
很长一段时间后,我将问题归结为以下问题:
事实证明,问题在于“缺失”内容的大小为零,因为布局没有设置这些内容的大小。
SWT.V_SCROLL
在我的情况下,可以通过SWT.H_SCROLL
从ScrolledComposite
. 因此,上面编写的代码按预期工作。
尽管这会导致所有内容的大小都被正确调整,但它会完全删除那些ScrollBars
在ScrolledComposite
某种程度上不是你想要的ScrolledComposite
.
有谁知道如何修复它或者这是否是一个错误(可能已在较新的 SWT 版本中修复)?
java - 如何在 Eclipse SWT 中使用 ScrolledComposite 实现动态大小的外壳?
我创建了一个 Shell 并向其中添加了一个 ScrolledComposite,其中包含一个 Text 作为其内容。但我希望外壳根据内容大小动态更改大小。我的实现如下
当我取消注释上面代码中的注释行时,shell 正在根据内容调整大小,但在这种情况下无法实现滚动条。
如果内容超出特定限制,我也想获得滚动条。如果内容在限制范围内,我不希望外壳有额外的空格。
有人可以在这里帮助我吗?
swt - ChartComposite 变成一个滚动的Composite
我需要将滚动放入图表中,但我不能使用 javax.swing,只使用 swt。
我想在类别轴中放置无限数量的项目,可能是 100 或 200,显然您需要滚动来查看 x 轴上的所有数据。
我已经用 SlidingCategoryDataset 实现了我的图表的数据集,但是滚动只使用项目的切片部分,
这些是创建图表和数据集的方法:
这是主要课程:
这段代码不起作用,因为只滚动了前 10 个项目:
你能帮忙看看这段代码吗?有没有办法只用 swt 做到这一点?我不能使用摇摆...
谢谢。
java - 尝试在滚动合成中创建 2000 个文本小部件(SWT),但只创建了 1092 个
我正在尝试在滚动复合 SWT 中创建 2000 个文本框,但只创建了 1092 个小部件。
我在我的代码中使用网格布局,当我将布局更改为 FillLayout 时,显示的小部件数量会增加,但它又是有限的。我没有看到任何其他问题。
我想知道如何创建 n 个小部件以及我在这段代码中做错了什么... 输出图像
swt - Nattable in SashForm expands the ScrolledComposite
I have a View(ScrolledForm) that contains two columns. In each column there is a SashForm and each section of the SashForm contains a Nattable. Now the requirement is that once the Sections widths (weights for the Sash) is done and the view is closed the same widths must be used (for good user experience).
The code works perfectly fine till the section is squeezed enough to make just the header of the nattable visible. Now after that when the composite is opened again, the section with the squeezed nattable expands and all the other sections expand proportionately (the weights are stored in the cache).
The observation is that when the section is squeezed to display two or less rows the view shows scrollbars (since the view is expanded).
java - 防止在文本字段上滚动?Java SWT
我在 ScrolledComposite 中有一个多行文本字段。如果我的鼠标在文本字段之外滚动工作正常,但如果我的鼠标在文本字段上,它将停止滚动 ScrolledComposite。我没有在文本字段上设置 V_Scroll 所以它不会滚动文本而是向上或向下移动一点。我怎样才能继续滚动 ScrolledComposite?平台:MacOS
swt - ScrolledCompsite 内的 SWT 表:鼠标滚轮不滚动
下面的代码取自: 如何在 SWT 表中始终显示垂直滚动条?
Table
ScrolledComposite
只能通过鼠标移动垂直滚动条或将鼠标直接放在垂直滚动条上并滚动滚轮来滚动。请您建议如何通过将鼠标放在鼠标滚轮上使表格可滚动Table
?
java - Java SWT ScrolledComposite Performance with many Composites 内部
我的 Java SWT ScrolledComposite 有问题:
在(居中的)ScrolledComposite 中显示了许多图片预览(参见图片图像)。如果加载了 ScrolledComposite 中的图像,则需要很长时间。在那之后,预览滞后于scolling。
快速:它的性能非常差。所以我的想法是:我计算 scoll 条并仅加载显示的图片。如果用户向下滑动,它将加载其他图片。
我的(测试)代码:
但是..我不知道这是否可能。有没有人有类似的问题?谢谢
PS:我需要一个与 Windows 10 文件浏览器非常相似的视图,其中“Big Icos”作为预览......以及相同的性能:)