ScrolledComposite使用方法及注意事项

final ScrolledComposite scrolledComposite = new ScrolledComposite( topForm, SWT.H_SCROLL | SWT.V_SCROLL ); final Composite child3 = new Composite( scrolledComposite, SWT.NONE ); scrolledComposite.setContent( child3 ); child3.setLayout( new FillLayout() ); scrolledComposite.setExpandHorizontal( true ); scrolledComposite.setExpandVertical( true ); scrolledComposite.setMinWidth( 1600 ); scrolledComposite.setMinHeight( 1200 );

 

ScrolledComposite 必须使用Composite 才能使滚动条生效

你可能感兴趣的:(scroll)