02-07-2024 02:49 PM
I'm wondering if there is a way in code to dynamically create buttons, text objects, etc in a SUD dialog box. In my case, I have an array set in code with a number of items, and I'd like to create text objects named from those items in the array. So instead of creating them by hand, I want the code to do it for me.
Solved! Go to Solution.
02-08-2024 02:35 AM
It is not possible to create controls dynamically via script in a sud dialog. As each control can be shown and hidden, you could create controls in the dialog that are initially hidden. Later you can make them visible and move them to another position if necessary.
Another option is to use the XTable. There you could create a column for each control type (text, edit box, button). If several texts or edit boxes are needed, increase the number of rows. Cells that should be empty and not editable can be hidden or disabled using Visible = 0 or Enable = 0 (in EventValGet). However, this variant leads to an unusual dialog design ;-).