Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Pictures for ComboBox Items
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Pictures for ComboBox Items
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Miscellaneous
Thread ID:
01532992
Message ID:
01532992
Views:
95
I'm trying to get a ComboBox control to display an image for each individual item, but I can't get the Picture[x] property to work.

The documentation says that you can use combo.Picture[1] etc. to set individual pictures but when I do those assignments it doesn't work. I CAN set the Picture property without an index and that works fine but with individual images it's not working.

At first I thought that maybe this is due to timing with databinding but even after moving the code into the DropDown() event it still doesn't work.
*** Works
*this.Picture = ShortPath(thisform.oHelp.cProjPath + "bmp\topic.gif")

FOR lnX = this.ListCount TO 1 STEP -1
   lcImg = thisform.oHelp.cProjPath + "bmp\" + TRIM(this.ListItem(lnX)) + ".gif"
   IF FILE(lcImg)
	*** Doesn't work
	this.Picture(lnX) = lcImg    
  ENDIF
ENDFOR
The image assignments fire but the images don't show.

Any ideas what I'm missing here?
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Next
Reply
Map
View

Click here to load this message in the networking platform