this.kdtEntrys_detailPanel.getAddNewLineButton().setVisible(false);
this.kdtEntrys_detailPanel.getInsertLineButton().setVisible(false);
this.kdtEntrys_detailPanel.getRemoveLinesButton().setVisible(false);
this.kdtEntrys_detailPanel.setTitle("分录");
Rectangle rect = this.kdtEntrys_detailPanel.getBounds();
Component[] comps = this.kdtEntrys_detailPanel.getComponents();
for (int i = 0; comps != null && i < comps.length; i++)
{
if (comps[i] instanceof KDPanel && "controlPanel".equals(comps[i].getName()))
{
KDPanel controlPanel = (KDPanel) comps[i];
Component[] comps2 = controlPanel.getComponents();
for (int j = 0; comps2 != null && j < comps.length; j++)
{
if (comps2[j] != null && "kdDetailCon".equals(comps2[j].getName()))
{
KDContainer kdConTitle = (KDContainer) comps2[j];
// controlPanel.add(kdConTitle,new com.kingdee.bos.ctrl.swing.KDLayout.Constraints(0, 5, rect.width - 170, 19, 5));
controlPanel.add(new KDWorkButton("引入资料"),new com.kingdee.bos.ctrl.swing.KDLayout.Constraints(rect.width-200, 5, 200, 19, 137));
}
}
}
}
设置分录表格的标题,给分录添加按钮,当标题无法显示全部文字时,可修改参数改变标题控件的长度。
最新推荐文章于 2022-07-25 10:33:06 发布