Buttons on Dialogs

Buttons placed on SIMUL8 Wizards or Custom dialogs automatically call the On Button Click Visual Logic when they are clicked. The BUTTON Global Data Item is set to the title of the dialog and the text on the button when the On Button Click Visual Logic is obeyed. For example, if a button is added to a dialog called “My Dialog”, and the button is titled “Arrival Schedule”, the value of text variable BUTTON will be set to Arrival Schedule once the button is clicked. If there is more than one button in the simulation, then an IF statement can be used within the On Button Click logic to check the button that was clicked:

   IF Button = "My Dialog:Arrival Schedule"
      Set main sheet Arrival_Schedule[1,1]
      Display main sheet

See Also