Using the Flex Properties

DIAdem 2018 Help


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

DOWNLOAD (Windows Only)


DIAdem 2017 Help
DIAdem 2018 Help
DIAdem 2019 Help
DIAdem 2020 Help
DIAdem 2020 SP1 Help

Use the Flex property to specify the change in the size and position of the control when you vertically scale a user dialog box during runtime.

If you assign different flex properties to the individual controls, the relative position of the controls changes when the user dialog box is scaled. For example, you can move buttons automatically to make room for a resizing textbox.

Complete the following steps to create a user dialog box which has three buttons and whose height and width can be changed during runtime.

  1. Select the DIAdem SCRIPT panel.

  1. Select Edit»Create Dialog Box.

  2. On the Properties tab click the right column next to the Resizeable field and select the setting 1-Yes so that the dialog box can be scaled during runtime.

  3. Click the Button control on the Controls bar. 

  4. Drag open the control in the dialog box. Position the button in the top left part of the dialog box.

  5. On the Properties tab click the right column next to the Flex field and select the setting Expand under Horizontal in the dialog box that opens . Click OK.

  6. Click the Button control on the Controls bar. 

  7. Drag open the control in the dialog box. Position the button to the right of Button1.

  8. On the Properties tab click the right column next to the Flex field and select the setting Expand under Horizontal in the dialog box that opens. Click OK.

  9. Click the Button control on the Controls bar. 

  10. Drag open the control in the dialog box. Position the button to the right of Button2.

  11. On the Properties tab click the right column next to the Flex field and select the setting Expand under Horizontal in the dialog box that opens. Click OK.

  12. Select File»Save As and save the file as Test.sud.

  13. Select View»Test in DIAdem.

    If you widen the user dialog box, you also widen the buttons which might then overlap. The distance of the controls to the left edge of the user dialog box remain unchanged.

  14. Close the dialog box to return to the dialog editor.

    Now configure the buttons in such a way that the buttons do not overlap when widened and that the distance between the buttons remains the same. Specify how the size change of the user dialog box influences the individual controls.

  15. Enable Button1 and click the right column next to the field Flex on the Properties tab. In the dialog box that opens select the setting Customized under Horizontal and enter 33 for Right (%). Click OK.

    This setting widens Button1 by 33 percent (right 33 - left 0 = 33) of the absolute width change of the dialog box. The right edge of the button does not move.

  16. Enable Button2 and click the right column next to the Flex field on the Properties tab. In the dialog box that opens select the setting Customized under Horizontal and enter for Left (%) 33 and for Right (%) 66. Click OK.

    This setting moves the Button2 button by 33 percent of the absolute width change of the dialog box to the right and widens it by 33 percent (right 66 - left 33 = 33).

  17. Enable Button3 and click the right column next to the Flex field on the Properties tab. In the dialog box that opens select the setting Customized under Horizontal and enter 66 for Left (%). Click OK.

    This setting moves the Button3 button by 66 percent of the absolute width change of the dialog box to the right and widens it by 33 percent (right 100 - left 66 = 34).

  18. Select File»Save As and save the file as Test.sud.

  19. Select View»Test in DIAdem.

    If you widen the user dialog box, you also widen the buttons. The distance between the buttons remains the same.

  20. Close the dialog box to return to the dialog editor.

  21. 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