SashForm 內似乎都設定為Filllayout般...加什麼元件都是填滿
用Setsize也不見到效果..
最後解決方式就是設定Composite再設定大小..
PS.sashForm自己先設定,此不贅述
Composite comp1 = new Composite(sashForm, SWT.NONE);
comp1.setLayout(new FormLayout());
Button ClearButton = new Button(comp1, SWT.PUSH);
ClearButton.setText("Clear"); ClearButton.setSize(20, 10);
FormData myFormData = new FormData();
myFormData.right = new FormAttachment(100,-10);
myFormData.top = new FormAttachment(0,5);
ClearButton.setLayoutData(myFormData);
全站熱搜
留言列表