I am having trouble implementing a dynamic button interface. I have an array of values that correspond to csv files that are loaded using READ_VARIABLES. I want to loop through the array and set the buttons vertically. The results are unpredictable. Some settings like name, color, height, toggle_group are not set for all buttons. Sometimes the screen flashes repeatedly
Are there limitations to setParameter? I have tried adding a delay between each setParameter statement using sleep and msgBox but it does not help.
Am I simply better off integrating an IE html form to provide this control?
The vbScript module does all the work:
v_jobs = "A,B,C,D,E,F,G"
IF NOT(ISARRAY(AR_JOBS)) THEN
ar_jobs = split(v_jobs, ",")
setParameter "BUTTON_INTERFACE", 1, "dialog_width", 160
setParameter "BUTTON_INTERFACE", 1, "dialog_height", ubound(ar_jobs)*50+90
setParameter "BUTTON_INTERFACE", 1, "dialog_x", 70
setParameter "BUTTON_INTERFACE", 1, "dialog_y", 20
for x = 0 to ubound(ar_jobs)
setButton x, ar_jobs(x)
next
END IF
sub setButton (b,n)
vx = cstr(b+1)
setBut vx&"_name", n
setBut vx&"_height", 46
setBut vx&"_width", 110
setBut vx&"_x_position", 20
setBut vx&"_y_position", 6+(b*50)
setBut vx&"_color", "#330099"
setBut vx&"_text_color", "#FFFFFF"
setBut vx&"_is_toggle", "TRUE"
setBut vx&"_toggle_group", "ALL"
setBut vx&"_clear_on_release", "FALSE"
setBut vx&"_variable_name", "V_CSV_X"
setBut vx&"_variable_value", b
end sub
sub setBut (p, v)
setParameter "BUTTON_INTERFACE", 1, p, v
'write p&":"&v&"|"
end sub
|
|