Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ADEL() in array
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Divers
Thread ID:
00549522
Message ID:
00549578
Vues:
13
>>>>I am only working with an array which is tied to a listbox.
>>>>I use the ADEL fnction to remove an item that the users has clicked on but since doing this does not change the array size I need the array resized so the "deleted" array item does not show up. might I somehow copy to another array and use that for the listbox. I can't use ACOPY( ) with qualifiers however.
>>>
>>>
>>>Just re-DIMENSION it, Timothy.
>>
>>Hi, I tried that but it looks screwy when the listbox gains focus after the redimension. My select statement selects about 6 or 7 fields for the listbox display and I guess this is a 2 dimension array? Do I need qualifiers with my adel function so I remove the entire "record"
>>-TB
>
>Tim,
>When you delete an array item, the entire row (unless you specify the column) is moved to the bottom of the array and given .F. values across the board. Simply re-dimension it using the current number of rows - 1 and the currnt number of columns.
>
>Ex.
>Adel(MyArray,nElement)
>lnlength = alen(MyArray,1)
>dimension MyArray(lnlength-1,alen(MyArray,2))
>
>You can also surround this stuff with THISFORM.LockScreen = .T./THISFORM.LockScreen = .F. if you get too much flickering.
>
>HTH.
Ok, I got your concept and executed. my array was 10 items, 7 cols.
I deleted 1 item using adel and redimensioned it using your code( 1 less row, same # of columns) Now the listbox has scores of .F. on the bottom 30 rows :(
"Build a man a fire, and he's warm for a day.
Set a man on fire, and he's warm for the rest of his life."
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform