STAAD.Pro Help

OS. To add the dialog buttons

The last step in defining the dialog is to add the OK and Cancel buttons.

  1. Click the Add OK Button tool.
  2. Click a point near the bottom, right corner of the form. The OK button is placed.
  3. Click the Add Cancel Button tool.
  4. Click a point to the right of the OK button.
    Note: This is the recommended button order according to Microsoft's design guidelines.
    The Cancel button is placed.
  5. (Optional) Either:

    right-click on either button to precisely edit the location


    drag the buttons to align them to the grid

  6. Select the Save and Exit tool. The UserDialog Editor closes.
The dialog definition code is added to your macro:
    Begin Dialog UserDialog 600,200,"2D Frame Model" ' %GRID:5,5,1,1
        Text 20,20,190,15,"No. of Horizontal Bays:",.Text1
        Text 20,45,190,15,"No. of Vertical Bays",.Text2
        Text 20,70,190,15,"Vertical Distance",.Text3
        Text 20,95,190,15,"Horizontal Distance",.Text4
        Text 20,130,190,15,"Support Type",.Text5
        TextBox 220,20,130,15,.clmn
        TextBox 220,40,130,15,.row
        TextBox 220,70,130,15,.ht
        TextBox 220,95,130,15,.wdth
        OptionGroup .sprt
            OptionButton 220,130,90,15,"Fixed",.OptionButton1
            OptionButton 370,130,90,15,"Pinned",.OptionButton2
        OKButton 360,165,90,20
        CancelButton 490,165,90,20
    End Dialog
    Dim dlg As UserDialog
    Dialog dlg
Tip: Now is a good time to save the work done to this point.