Hello,
I am using a dynamic form layout and I want to place an "Edit" and an "Delete" button behind a TextItem. I set 4 columns (2 column for texIten and 1 column for each button), but I can not place the "Delete" button in Column 4 behind the "Edit" button. Using "setStartRow( false )" ony works for one button. The second button will be placed in a new row instead of showing up in column 4 (see Screenshot). Somebody knows a working solution?
I am using a dynamic form layout and I want to place an "Edit" and an "Delete" button behind a TextItem. I set 4 columns (2 column for texIten and 1 column for each button), but I can not place the "Delete" button in Column 4 behind the "Edit" button. Using "setStartRow( false )" ony works for one button. The second button will be placed in a new row instead of showing up in column 4 (see Screenshot). Somebody knows a working solution?
Code:
editorForm = new DynamicForm(); editorForm.setNumCols(4); editorForm.setWidth(800); editorForm.setDataSource( dataSource ); editorForm.setUseAllDataSourceFields( false ); editorForm.setColWidths( 80, "*", 80, 80); comboType = new SelectItem ( "email_type", "Type" ); comboType.setColSpan( 4 ); comboType.setPickListWidth( 350 ); comboType.setWidth( "*" ); comboType.setOptionDataSource( CListSupplyMailTypes.getInstance() ); txtTo = new TextItem( "to_recipients", "To" ); txtTo.setWidth( "*" ); txtTo.setWrapTitle( false ); ButtonItem buttonEditTo = new ButtonItem( "editTo", "Edit" ); buttonEditTo.setWidth( "*" ); buttonEditTo.setStartRow( false ); buttonEditTo.setIcon( "icons/32x32/users.png" ); ButtonItem buttonDeleteTo = new ButtonItem( "deleteTo", "Löschen" ); buttonDeleteTo.setWidth( "*" ); buttonDeleteTo.setStartRow( false ); buttonDeleteTo.setIcon( "icons/32x32/users.png" ); txtCC = new TextItem( "cc_recipients", "CC" ); txtCC.setWrapTitle( false ); txtCC.setWidth( "*" ); ButtonItem buttonEditCC = new ButtonItem( "editCC", "Edit" ); buttonEditCC.setWidth( "*" ); buttonEditCC.setStartRow( false ); buttonEditCC.setIcon( "icons/32x32/users.png" ); ButtonItem ButtonDeleteCC = new ButtonItem( "deleteCC", "Löschen" ); ButtonDeleteCC.setWidth( "*" ); ButtonDeleteCC.setStartRow( false ); ButtonDeleteCC.setIcon( "icons/32x32/users.png" ); txtBCC = new TextItem( "bcc_recipients", "BCC" ); txtBCC.setWidth( "*" ); ButtonItem buttonEditBCC = new ButtonItem( "editBCC", "Edit" ); buttonEditBCC.setWidth( "*" ); buttonEditBCC.setStartRow( false ); buttonEditBCC.setIcon( "icons/32x32/users.png" ); ButtonItem ButtonDeleteBCC = new ButtonItem( "deleteBCC", "Löschen" ); ButtonDeleteBCC.setWidth( "*" ); ButtonDeleteBCC.setStartRow( false ); ButtonDeleteBCC.setIcon( "icons/32x32/users.png" ); txtHeadline = new TextItem( "headline", "Headline" ); txtHeadline.setColSpan( 4 ); txtHeadline.setWidth( "*" ); txtText = new TextAreaItem( "email_text", "Text" ); txtText.setColSpan( 4 ); txtText.setHeight( 400 ); txtText.setWidth( "*" ); checkSelfCopy = new CheckboxItem( "self_copy", "Send Copy to my adress" ); checkSelfCopy.setColSpan( 4 ); txtCreator = new StaticTextItem( "creator", "Creator" ); txtCreator.setColSpan( 4 ); txtCreationDate = new StaticTextItem( "creation_date", "Creation Date" ); txtCreationDate.setColSpan( 4 ); editorForm.setFields( comboType, txtTo, buttonEditTo, buttonDeleteTo, txtCC, buttonEditCC, ButtonDeleteCC, txtBCC, buttonEditBCC, ButtonDeleteBCC, txtHeadline, txtText, checkSelfCopy, txtCreator, txtCreationDate ); editorForm.draw();
Comment