AppendItem

The buttons on a Menu Strip/SideBar buttons are typically configured from the Dev Studio Configuration > SideBar and Keyboard Settings > System Menu Configuration table.

The VBA MenuStrip.AppendItem appends other menu actions/buttons to the SideBar.

Group:   MenuStrip Extensions


Syntax: MenuStrip.AppendItem (Action, Display, ImageName)

Action           (enSideBar) is the enumeration describing the built-in command that is executed when the user taps the SideBar menu button. The possible values and descriptions for each enumeration is listed below under "enSideBar".

vDisplay       (Variant) is the label for the button. The string can also be the TextID from Text Resources.

vImageName    (Variant)  is the icon/image used as the button. Use the id of the image listed under Images.

[Name]         Optional. If the sbAction is CallForm, use this parameter to list the name of the application that the user is to be transferred to.

[Option]       Optional. If the sbAction is CallMenu, use this parameter to pass the Form_Load event from the prompt that has focus.

enSideBar

  • sbBack – Executes the OnBackup event, which typically moves the prompt to the previous prompt/page.
  • sbCallEvent – Executes the OnMenu( ) event from where the prompt has focus. For example, TextBox1_OnMenu(). The Form_OnMenu() always executes as well.
  • sbCallForm – Executes the RFgen built-in CallForm application. It transfers the user to another application. This action requires you include the Name of the application the user will be transferred to.
  • sbCallMenu – Executes the RFgen built-in CallMenu application. It transfers the user to another menu. This action requires the Option parameter.
  • sbClear – Clears the data entered for the current prompt.
  • sbConfig – Launches the RFgen built-in device configuration screen.
  • sbExit – Exists the current process.
  • sbKeyboard – Shows or hides the soft input panel (SIP) also called a soft keyboard.
  • sbNone – Toggles the display of the SideBar depending on the values set for System Icon Action property in the Application Theme, and for the AutoHide property in the SideBar Theme.
  • sbScan – Accesses the scan function on the device.
  • sbSearch – Launches the OnSearch event from the prompt that has focus.
  • sbSideBar – Shows or hides the sidebar.
  • sbSignOut – Launches the RFgen Login application so the user can sign out.
  • sbSubmit – Enters the data appearing for the current prompt.
  • sbTerminate – Executes the terminate event which is typically used to manually close an open database connection, session connection, or release links to ActiveX objects.

Example

'This is an example of a Submit action that is appended to the menu strip (sidebar).

MenuStrip.AppendItem (sbSubmit, "Submit", "DownArrow")

'This adds a button to the menu strip that performs the Submit action, displays the word ‘Submit’ and shows a down arrow icon on the button.

 

Example

'This is an example of a CallForm action that is added to the menu strip (sidebar).

'The initial items are the menu strip are first cleared and then the buttons labeled "Process Reports" is displayed on the menu strip.

MenuStrip.Clear

MenuStrip.AppendItem(sbCallForm,"CallFormProcess","32.jpg","Process Reports", "-sbCall_Plant=WHS254 -sbCall_LOCN=SacramentoCA")

----------------------

‘In ProcessReports form:

      If App.GetValue("sbCall_Plant") = "WHS254" And App.GetValue("sbCall_LOCN") = "SacramentoCA"

          Then

       App.Msgbox(“CallForm correctly called the form and returned proper load options")

   End If

Supported Version  RFgen 5.0 and newer.