scrollbars don't scroll in Composite [message #1779800] |
Fri, 12 January 2018 20:22 |
Beth Arnold Messages: 3 Registered: January 2018 |
Junior Member |
|
|
I'm sure this has been answered before, but I just can't find it.
Eclipse Helios RCP code
Java 1.6
Now that everyone has finished laughing ...
I added a Composite inside another composite and I run through a loop, adding an unknown number of buttons to the second Composite. I did try using a ScrolledComposite, but can't get the buttons to appear in it, so I'm using a vanilla Composite. The scrollbars appear, but don't do anything.
Code speaks louder than words. I've left stuff out, but this is the gist. I'm sure there's something simple I've left out, like enabling scrolling or reciting the Pledge of Allegiance.
Composite wComp1 = new Composite(wComp, SWT.V_SCROLL|SWT.H_SCROLL);
wComp1.setBackground(null);
setControl(wComp1);
wComp1.setLayout(new FormLayout());
wData = new FormData();
wData.top = new FormAttachment(wLastControl, 20);
wData.left = new FormAttachment(0, 10);
wData.right = new FormAttachment(100, -10);
wData.bottom = new FormAttachment(100, -10);
wComp1.setLayoutData(wData);
try {
//get the data
pCodes[] = ...... (omitted)
for (int i = 0; i < pCodes.length; i++) {
if (pCodes[i].getPayerBypassCode() != BigInteger.ZERO) {
Button wButton = new Button(wComp1, SWT.CHECK);
wButton.setBackground(null);
wData = new FormData();
wData.left = new FormAttachment(0, 25);
wData.top = new FormAttachment(wLastControl, 5);
wButton.setLayoutData(wData);
addPayerBypassButton(wButton, pCodes[i]);
wButton.addSelectionListener(new SelectionListener() {
---------------------------------------------------------------------------------------------------------------
Appreciate any help!
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.09674 seconds