use LockWindowUpdate around your loop and it won't seem so slow.
--- Alan Colburn <[EMAIL PROTECTED]> wrote: > I've got a form with a bunch of RadioGroups. I created an array of > RadioGroups to make it easier to write code to work with the group. I've > also got a ComboBox in which the user can choose whether s/he would like to > display 2, 3, or 4 items (i.e., select "2" and all the RadioGroups will have > 2 and 1 as their items; select "3" and they'll all display 3, 2, and 1). > > The ComboBox OnChange event begins by clearing all the RadioGroups, and then > adding items back (with the items added depending upon what the user > selected in the ComboBox): > > for i := 1 to 19 do > begin > gRadioArray[i].Items.Clear; > with cbxPerformanceLevels do > //add items here, depending on what user selected > end; > > The code works fine, and it's simple. The problem is that it's slow. On my > machine I can watch each RadioGroup be cleared, one at a time, before items > are added in. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _______________________________________________ Delphi mailing list -> [email protected] http://www.elists.org/mailman/listinfo/delphi

