두 개의 탭에 각각보기가 있습니다. tabview 자체는 scrollview에 있습니다. 어떤 이유로 스크롤 막대가 큰 탭에 표시되지 않습니다. ,SWT/JFace Scrollview가 스크롤되지 않습니다.
public CustomerTab(Composite arg1, int arg2) throws SQLException {
super(arg1, arg2);
layout = new org.eclipse.swt.layout.GridLayout(GridData.FILL_BOTH, false);
layout.numColumns = 1;
this.setLayout(layout);
한, 즉 스크롤 막대를 표시 일으키지 않는 것 같은 시작 : 그래서 같은 (일) tabview을 설정
내 응용 프로그램에서public InvoiceTab(Composite parent, int arg2) throws Exception {
super(parent, arg2);
// new gridlayout and asign to this tab
gridLayout = new org.eclipse.swt.layout.GridLayout(GridData.FILL_BOTH, false);
gridLayout.numColumns = 3;
this.setLayout(gridLayout);
, 나는 쉘을 구성
를@Override protected void configureShell(Shell shell) {
super.configureShell(shell);
shell.setSize(1130, 530);
setShellStyle(SWT.SHELL_TRIM & (~SWT.RESIZE));
}
하고있는 ScrollView 이런 식으로 만들 :
@Override protected Control createContents (Composite parent) {
scrolledComp = new ScrolledComposite(parent, SWT.H_SCROLL | SWT.V_SCROLL);
mainContent = new Composite(scrolledComp, SWT.NONE);
mainContent.setLayout(new FillLayout());
mainTabView = null;
mainTabView = new MainTabView(mainContent);
scrolledComp.setContent(mainContent);
scrolledComp.setExpandHorizontal(true);
scrolledComp.setExpandVertical(true);
scrolledComp.setMinSize(1100, 500);
return mainTabView;
}
을
스크롤보기는 500 번까지만 표시되지만 아래에는 내용이없고 스크롤바는 표시되지 않습니다. 아무도 내가 뭘 잘못하고있는 걸 볼 수 있니? 사전에
고맙습니다, 마커스
당신이 봤어 :'scrolledComp.setMinSize (mainContent.computeSize (SWT.DEFAULT, SWT.DEFAULT))'다음 코드를 사용할 수 있습니까? – Baz
그냥 참고 사항 :'GridLayout'의 첫 번째 인수는'numColumns'입니다. 왜 당신이'GridData.FILL_BOTH'를 사용해야하는지 모르겠습니다. – Baz
GridData.FILL_BOTH가 잘못된 곳에서 수정되었습니다. 이전에는 없었습니다. 8) Thanx가 computeSize와 함께 작동하도록했습니다. 그 대답을하고 싶지 않니? –