final Composite c = new Composite(parent, SWT.NONE);
c.setLayout(new FormLayout());
c.addPaintListener(new PaintListener(){
@Override
public void paintControl(PaintEvent e) {
int x = c.getBounds().x;
int y = c.getBounds().y;
e.gc.setForeground(SWTResourceManager.getColor(0));
e.gc.drawLine(x, y-23, x + c.getBounds().width, y-23);
}
});
하지만 어떻게 경계가 같은 모양 & 기본 테두리로 느낄 수있다 만들 수 있습니까? 어떻게하면 합성물의 오른쪽 Y 좌표를 얻을 수 있습니까?
복합체에 위쪽 테두리 만 있으면 좋을 다른 방법이 있습니까?
SWT.COLOR_WIDGET_NORMAL_SHADOW은 기본적으로 같다. – CaiNiaoCoder