Mike Sue-Ping
Cambridge, Ontario, Canada
Information générale
Catégorie:
Codage, syntaxe et commandes
Mike
If you have more than 100 records then go for Grid it would solve more problems.
>I'm trying to populate a listbox that has three columns. I set its columncount=3 and since I don't care to see the third column (but need it) I set the columnwidths="100,80,0". I want the list to be sorted by column 1 (some names) and items in it need to be able to be removed and/or added.
>
>Now I populate the list by scanning thru a cursor and issuing three AddListItems - one for each column. This works and the list functions exactly as I require, but, it takes much longer to populate than if I were to instead set the list's RowSourceType=3 (SQL statement) and its RowSource to a string containing the select statement that generated the cursor that I was scanning thru.
>
>Why is the latter so much faster? I've experimented with the list's sorted property when populating it with the first method but its slow either way. Also, when I populated the list using the SQL statement, I couldn't add or remove items using AddListItem or RemoveItem. So although it may be very fast to populate and display, its useless for my needs.
>
>Anyone have suggestions as to how I may get a listbox to display its contents quickly and function the way I want?
>
>TIA
>
>Mike
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement