01-30-2018 12:03 AM
Hello:
I want to let combobox remember text of last selection.
My present method is using editbox cooperate with combobox, which is not beautiful and tidy. Do you have any better tips to achieve this function?
Thanks in advance.
Dina Ding
Solved! Go to Solution.
01-30-2018 10:19 AM
Hi,
I personally use some Diadem variable such as R1 R2.. R30, O1..O10 etc. Then your choice changes this variable, which is what initiates the combobox value.
I hope it helps.
L911
01-31-2018 10:16 AM
Hi Dina,
Your two main options are to use a global DIAdem variable (RAM) or to use file I/O to cache the dialog state in an ASCII or XML file. For the global variable approach, the default temporary variables (L1, R1, T1...) are particularly convenient because they're already declared any time DIAdem starts. You can use your own global variables instead though, just make sure you GlobalDim() them before the SUDialog is first invoked from a DIAdem VBScript. You either associate such global variables 1 to 1 with each of the SUDialog controls, or you can use the dialog initialization event or the individual control initialization events to explicitly read the global variable state and assign it to the control. For the file I/O option you'd want to use the dialog initialization event to read all the control states from the ASCII or XML file and assign them all.
Brad Turpin
DIAdem Product Support Engineer
National Instruments