Community
Participate
Working Groups
Execute the following code: Shell shell = new Shell(SWT.MENU | SWT.RESIZE | SWT.TITLE | SWT.V_SCROLL | SWT.H_SCROLL); ScrollBar hbar = shell.getHorizontalBar(); ScrollBar vbar = shell.getVerticalBar(); hbar.setMaximum(0); System.out.println("hbar.getMaximum() " + hbar.getMaximum()); hbar.setVisible(false); // comment out this line and vbar.setMaximum works vbar.setMaximum(0); // this call has no effect System.out.println("vbar.getMaximum() " + vbar.getMaximum()); vbar.setMaximum(0); // second call works System.out.println("vbar.getMaximum() " + vbar.getMaximum()); The first call to vbar.setMaximum(0) has no effect unless the horizontal scroll bar is visible. NOTES: McQ (29/11/2000 10:10:36 AM) - Not sure what's going on here. If it's an o/s limitation, you're probably just stuck. If it's something we are doing wrong, then we should fix it. SN to investigate.
PRODUCT VERSION: swt 0.29
No longer appears to be happening. KR, can you confirm? Here is the code that I'm using: package steve; import org.eclipse.swt.*; import org.eclipse.swt.widgets.*; public class PR_4462 { public static void main(String arguments[]) { Shell shell = new Shell(SWT.MENU | SWT.RESIZE | SWT.TITLE | SWT.V_SCROLL | SWT.H_SCROLL); ScrollBar hbar = shell.getHorizontalBar(); ScrollBar vbar = shell.getVerticalBar(); hbar.setMaximum(25); System.out.println("hbar.getMaximum() " + hbar.getMaximum()); hbar.setVisible(false); // comment out this line and vbar.setMaximum works vbar.setMaximum(50); // this call has no effect System.out.println("vbar.getMaximum() " + vbar.getMaximum()); vbar.setMaximum(33); // second call works System.out.println("vbar.getMaximum() " + vbar.getMaximum()); } }
Verified fixed
Verified by KR.