Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ListBox Using Array
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00049215
Message ID:
00049220
Vues:
51
>>I cannot figure this out for the life of me and I am sure I am missing something silly.
>>
>>I have a form with a pageframe containing 3 pages. On the first page is a set of checkboxes (within a container if that makes any difference).
>>
>>On page3 is a list box with a RowSourceType of 'Array' and a RowSource of 'solutions'. 'Solutions' is a public array declared in the load method of this form. This array is initially dimensioned with 1 element containing Space(1).
>>
>>When some checks one of the boxes on page1 the click method of that checkbox passes the caption of that checkbox to a method that adds this caption to the array (or replaces the first element with the caption if the element is = Space(1)).
>>
>>Now, the array is working fine and contains the values that I expect it to. The problem is that nothing is showing up in this list box. In the Activate method of page3 I have:
>> WITH THIS.listsol && Name of listbox is listsol
>> .requery()
>> .refresh()
>> ENDWITH
>>The form works fine but I get nothing showing in the listbox. I have done this many times before but the listbox was always on the form (without any pageframes or pages).
>>
>>Any ideas as to what I am doing wrong?
>>
>>TIA,
>>George
>
>why requery if you're building the array by hand?
Maybe I misunderstand how 'requery' is used. According to the docs:

"Use the Requery method to ensure a control contains the most recent data. The Requery method requeries the RowSource property and updates the list with the new values."

I interpreted this to mean that if elements are added to the array that using 'requery' would update the list. Am I interpreting this incorrectly? If so, what would I need to do to refresh the list?
Everything we see or seems
Is but a dream within a dream
- Edgar Allen Poe
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform