病毒补丁短信wish Merry X'mas >>
<< 一个萝卜一个坑
Size of Property Page Seems Bigger

Author Zhou Renjian Create@ 2004-12-23 15:59
whizz Note icon
It seems that Eclipse will try to adjust the property page dialog according to the property page itself by calling the computeSize method. As some control in the property page do not explicitly override the computeSize method, such calling of computeSize method will go the layout's computeSize, the layout will always return a big size for the SWT.DEFAULT parameter, so the whole property page will be much bigger than normal.

Try to override the computeSize method, such as:
    public Point computeSize(int wHint, int hHint, boolean changed) {
        Point point = super.computeSize(wHint, hHint, changed);
        if (point.x > 500 && wHint == SWT.DEFAULT) {
            point.x = 500;
        }
        if (point.y > 400 && hHint == SWT.DEFAULT) {
            point.y = 400;
        }
        return point;
    }

本记录所在类别:
本记录相关记录: