FormFunctionButtonControl actionButton; FormActionPaneControl actionPane; int i; // Determine if action pane control exists on form. for (i=1; i<=formDesign.controlCount(); i++) { if ((formDesign.controlNum(i).handle() == classNum(FormActionPaneControl))) { actionPane = formDesign.controlNum(i); break; } }
// if we have an action pane, add workflow message bar group directly after it if (actionPane != null) { workflowActionPaneButtonGroup = actionPane.addControl(FormControlType::ButtonGroup, #WorkflowActionPaneButtonGroup); workflowActionPaneButtonGroup.visible(false); workflowActionPaneButtonGroup.dataSource(workflowDatasource.name()); actionBarButtonGroup = workflowActionPaneButtonGroup.addControl(FormControlType::MenuButton, #WorkflowActionBarButtonGroup); actionBarButtonGroup.text("@SYS110684"); actionBarButtonGroup.imageLocation(SysImageLocation::Symbol); actionBarButtonGroup.normalImage('Workflow'); actionBarButtonGroup.needsRecord(true); actionBarSubmitButton = actionBarButtonGroup.addControl(FormControlType::MenuFunctionButton, #WorkflowActionBarSubmitButton); actionBarSubmitButton.menuItemType(MenuItemType::Action); actionBarSubmitButton.dataSource(workflowDatasource.name()); actionBarSubmitButton.visible(false); actionBarSubmitButton.enabled(false);