蛋蛋同志问起:
(
2006
-
05
-
18
13
:
49
:
48
) 邢红瑞(
50128986
)
david师傅,SWT中Table如何出现横向滚动条
其实方法很简单,就是用一个scrolledComposite包住这个Table,呵呵

protected
void
createContents()
{
setText(
"
SWT Application
"
);
setSize(
500
,
375
);
final
ScrolledComposite scrolledComposite
=
new
ScrolledComposite(
this
, SWT.BORDER
|
SWT.H_SCROLL
|
SWT.V_SCROLL);
final
Composite composite
=
new
Composite(scrolledComposite, SWT.NONE);
table
=
new
Table(composite, SWT.BORDER);




.
效果如下图:
本文介绍在SWT框架中实现Table组件横向滚动的方法。通过使用ScrolledComposite包裹Table,可以轻松实现横向滚动功能。
2379

被折叠的 条评论
为什么被折叠?



