Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding pictures to a listbox in VFP5
Message
 
À
14/08/1998 19:47:31
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00126978
Message ID:
00127810
Vues:
30
>>My row source is set to array. I have a loop that goes through the array setting the picture property for the listbox. This works ok in VFP3 but under 5 the same code doesn't seem to work.
>>
>>Any ideas?
>
>
>Can you post the code?

I solved the problem by initializing the picture property in the form designer to one of the bitmaps. In my example I would initialize it to 'a.bmp'. It seems that without initializing it VFP does not leave enough room for the picture to show up, I can only see the left row of pixels of my bitmaps. The exact same code works ok in VFP3 without initializing the picture property of the listbox in the form designer.

FYI - The code!

SELECT * FROM myTable INTO ARRAY THISFORM.paArray

FOR lnCount = 1 TO _TALLY
DO CASE
CASE THISFORM.paArray[lnCount, 3] = "a"
THISFORM.ListBox.Picture[lnCount] = "a.bmp"
CASE THISFORM.paArray[lnCount, 3] = "b"
THISFORM.ListBox.Picture[lnCount] = "b.bmp"
ENDCASE
ENDFOR
Shane Murdoch
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform