By default, the generated button adjusts its width based on the displayed content and does not fill any extra space.
public int getButtonWidth() { //always use layout width to fill the space if ( _layoutWidth > 0 ) { return _layoutWidth; } return super.getButtonWidth(); } public void setLayoutWidth(int width) { super.setLayoutWidth(width); _layoutWidth = width; }
// customize BOBScreenUpdate_Sales_order protected Object createControlById(int ID) { switch (ID) { case BUTTON16: //Create button "Submit" Button localbutton16 = new FillButton(Field.FIELD_RIGHT | Field.FIELD_VCENTER); return localbutton16; case BUTTON17: //Create button "Cancel" Button localbutton17 = new FillButton(Field.FIELD_LEFT | Field.FIELD_VCENTER); return localbutton17; default: break; } return super.createControlById(ID); }