One thing to note is that << Set Selected will run script associated with list box (if there is one) by default. If you have script associated with it but don't want it to trigger with each set, use << Set Selected(idx, 1, Run Script(0)) (you can trigger it on last set if you need to)
Names Default To Here(1);
rowcount = 100000;
dt = New Table("Demo",
Add Rows(rowcount),
New Column("Values", Character, Nominal, << Set Each Value(
Hex(Row()) || Hex(Row()) || Hex(Row())
))
);
values = Column(dt, 1)[dt << get rows where(Excluded(Row State()) != 1)];
Close(dt, no save);
nw = New Window("test",
H List Box(
lb2_collector = V List Box(
lb2 = List Box(values, nlines(10), width(100), Show(1)),
),
Button Box("reset2", reset_lb2),
)
);
reset_lb2 = Expr(
start3 = HP Time();
vlb = V List Box(lb2 = List Box(values, nlines(10), width(100), Show(1)));
For(i = 1, i < N Items(values), i++,
lb2 << set selected(i, 1, Run Script(0));
);
lb2 << set selected(N Items(values), 1, Run Script(1));
While(!IsEmpty(lb2_collector << child),
(lb2_collector << child) << delete box;
);
lb2_collector << Append(vlb);
end3 = HP Time();
Show((end3 - start3)/1e6);
);
Write();
-Jarmo