改变对话框默认的工具按钮的布局默认是居右。
//重写createButtonsForButtonBar方法
protected void createButtonsForButtonBar(Composite parent) {
parent.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
Composite c = new Composite(parent,SWT.BORDER);
}
本文介绍了一种通过重写createButtonsForButtonBar方法来改变默认对话框中工具按钮布局的方法,使其不再默认居右。
改变对话框默认的工具按钮的布局默认是居右。
//重写createButtonsForButtonBar方法
protected void createButtonsForButtonBar(Composite parent) {
parent.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
Composite c = new Composite(parent,SWT.BORDER);
}
205

被折叠的 条评论
为什么被折叠?
