wf_bottomBar_load()

The function configures and loads the bottom bar.

Synopsis

void wf_bottomBar_load( dyn_string dsButtons, dyn_string dsVis, dyn_string dsEn, dyn_string dsExec, dyn_string dsPaths, string sReferenceName );

Parameter

Parameter Description
dsButtons List of buttons that should be displayed inside the bottom bar. Following buttons are available:
  • „btn_BottomBar_help“: Help button (shortcut key F1)
  • „btn_BottomBar_save“: Save button (shortcut key ctrl + s)
  • „btn_BottomBar_cancel“: Cancel Button (shortcut key Esc)
  • „btn_BottomBar_close“: Close button
  • „btn_BottomBar_ok“: OK button
  • „btn_BottomBar_yes“: Yes button
  • „btn_BottomBar_no“: No button
dsVis List of functions and scripts that are used for the visibility of the used buttons. E.g. permission check, licence check etc. If the respective button shall always be visible, the keyword "wf_alwaysTrue" must be used. See the example at the end of this page.
dsEn List of functions and scripts that are used for the operability of buttons (enabled, disabled). E.g. permission check, licence check etc. If the respective button shall always be enabled, the keyword "wf_alwaysTrue" must be used. See the example at the end of this page.
dsExec List of functions and scripts that are called by the click event of the respective button. See the example at the end of this page.
dsPaths List of icon paths (relative path) that shall be displayed instead of the button text.
sReferenceName Reference name that is used for the bottom bar. The reference name can be used in other scripts to directly address the bottom bar. See the example at the end of this page.

Return Value

-

Error

-

Description

By setting the required buttons and the functionality of the click events the bottom bar can be configured and customized to the project. The enabled and visibility states can be adjusted and set dynamically by adding corresponding scripts.

Example

The following example creates a bottom bar with the buttons "Apply", "Cancel" and "Close". Note that the text field TEXT_FIELD1 as well as the bottomBar as reference "btnBar" must exist in the panel where this code is used.

#uses "wizardFramework.ctl"
main()
{
  TEXT_FIELD1.text("foo"); // set to "foo" to simulate isChanged state
  string sSaveExeFunc = "main(){ wf_panel_save(TRUE, TRUE);}";
  string sCancelExeFunc = "main(){ wf_panel_reload();}";
  string sCloseExeFunc = "main(){ wf_panel_exit(FALSE);}";
  string isChanged = "bool main(){ return TEXT_FIELD1.text != \"\";}"; // set to "" to
  simulate isChanged state
  /* makeDynString("wf_alwaysTrue", "wf_alwaysTrue", "wf_alwaysTrue") = sets the buttons visible
  "isChanged", "isChanged", "wf_alwaysTrue") = enables the buttons
  sHelpVisExec, sSaveExeFunc, sCancelExeFunc, sCloseExeFunc) = functionality of the buttons
  The reference name is btnBar */
  wf_bottomBar_load(makeDynString("btn_BottomBar_save",
  "btn_BottomBar_cancel","btn_BottomBar_close"),
  makeDynString("wf_alwaysTrue", "wf_alwaysTrue", "wf_alwaysTrue"),
  makeDynString(isChanged, isChanged, "wf_alwaysTrue"),
  makeDynString(sSaveExeFunc, sCancelExeFunc, sCloseExeFunc),
  makeDynString("", "", "", ""),
  "btnBar")
}
Abbildung 1. bottomBar and Buttons in a panel in the GEDI
Abbildung 2. bottomBar and Buttons in a panel at runtime
Abbildung 3. BtnBottomBar.pnl - Add the panel as reference to the panel via Drag and Drop

Assignment

Bottom Bar

Availability

UI, CTRL