Enabling Controls

DIAdem 2018 Help


Edition Date: June 2018
Part Number: 370858P-01
View Product Info

DOWNLOAD (Windows Only)


DIAdem 2015 Help
DIAdem 2017 Help
DIAdem 2018 Help
DIAdem 2019 Help
DIAdem 2020 Help

Use the Enable property to define whether the user can enable a control.

Complete the following steps to define whether the user can enable a control, with a checkbox.

  1. Select the DIAdem SCRIPT panel.

  1. Select Edit»Create Dialog Box.

  2. Click the EditBox control on the Controls bar. 

  3. Drag open the control in the dialog box.

  4. Click the Checkbox control on the Controls bar. 

  5. Drag open the control in the dialog box. Position CheckBox1 in front of EditBox1.

  6. Click the column to the right of the Text field on the Properties tab. CheckBox1 must be selected. Enter the text Enter value.

  7. Click ... in the EventChange field on the Events tab. CheckBox1 must be selected.

  8. Enter or copy the following text into the script editor:

    Sub CheckBox1_EventChange(ByRef This)
      EditBox1.Enable = (This.Value=1) ' Editbox can be enabled if checkbox is selected
    End Sub
    Note  Add the above text to the lines generated automatically by the script editor.
  9. Select File»Save As and save the file as Test.sud.

  10. Select View»Test in DIAdem.

  11. Enable the checkbox.

    If you set a tick, you can enter a value or a text in the input field. If you delete the tick, the input field cannot be enabled and is dimmed.

  12. Close the user dialog box in DIAdem.

  13. Close the dialog editor.

Examples

Analyzing and Displaying Channels Section by Section | Checking Dialog Box Entries | Dynamic User Dialog Box | Translating User Dialog Boxes | User Dialog Box for Entering Text and Numbers | User Dialog Box for Sequence Control | User Dialog Box in DIAdem VIEW | User Dialog Box in VIEW for the Calculation of the FFT and Harmonic Frequencies | User Dialog Box with Changing Background Color | User Dialog Box with Curve Preview | User Dialog Box with Extended Table | User Dialog Box with Internet Explorer | User Dialog Box with Scalable Table | User Dialog Box with Selection Lists | User Dialog Box with Selection Lists | User Dialog Box with Subdialog Boxes | User Dialog Box with Tables | User Dialog Box with Tree | Wizard for Tolerance Evaluation

WAS THIS ARTICLE HELPFUL?

Not Helpful