開發過程中發現,單據編輯界面上,多頁籤中如果有文本編輯控件,則設定錨定後會看不到預想的效果,比如編輯框設定了距右邊固定,但運行期發現控件的右邊超出了界面,解決這個問題必須要通過代碼處理的方式,具體示例如下:
public void initUIContentLayout() {
super.initUIContentLayout();
int width = paneBIZLayerControl34.getBounds().width;
int height = paneBIZLayerControl34.getBounds().height - 30;
ContractEstimateCost.putClientProperty("OriginalBounds", new Rectangle(0, 0, width, height));
}
即要對頁簽在代碼中做初始化的處理纔行。