CPB Mailing List

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ListBox?



> How do I clear the contents of a ListBox?
 
Here's a code snippet I use to clear and load a listbox.
 
GetVarList is my form, while VarXList and VarYList are two listboxes on the form.
 
   if (SSData->col > 0) {
      GetVarList->VarXList->Items->Clear();
      GetVarList->VarYList->Items->Clear();
      for (i=0;i<=SSData->col;i++) {
         sprintf(val,"Var %d",i+1);
         GetVarList->VarYList->Items->Insert(i,val);
         GetVarList->VarXList->Items->Insert(i,val);
      }
   }
 
Chris Strickland
Email: cstrick@iu.net
New Horizons Software - http://new-horizon.net/
[Central Florida Jobs, Mutual Fund Directory, Games and more]

W Komornicki's Home Page | Main Index | Thread Index