今天把机子显示模式调到 "Windows经典",发现 Form 中的 Text, Table 等控件都没有了边框,变成了空白。
而把创建控件的代码,加上 SWT.BORDER,显示的是三维凹陷的边框,不符合我的要求,我想要 PDE 那样的效果。
查看 Eclipse 源码,发现以下段:
而把创建控件的代码,加上 SWT.BORDER,显示的是三维凹陷的边框,不符合我的要求,我想要 PDE 那样的效果。
查看 Eclipse 源码,发现以下段:
java 代码
- public class FormToolkit {
- ...
- private class BorderPainter implements PaintListener {
- public void paintControl(PaintEvent event) {
- Composite composite = (Composite) event.widget;
- Control[] children = composite.getChildren();