Fightpa Sirprite
Fightpa Sirprite

Reputation: 11

How to adding scroll bar and it work in Composite

ScrolledComposite sc = new ScrolledComposite(parent, SWT.H_SCROLL | SWT.V_SCROLL);
        Composite composite = new Composite(sc, SWT.NONE);
        composite.setSize(1000, 1000);
        composite.setLayout(new FillLayout());
        composite.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_WHITE));

Display shown scroll bar but doesn't work

How to fix it ?

Upvotes: 0

Views: 2066

Answers (1)

Vu.N
Vu.N

Reputation: 149

I think you should set content of ScrolledComposite, like this:

sc.setContent(composite);

Upvotes: 2

Related Questions