Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Pictures for ComboBox Items
Message
From
16/01/2012 05:47:47
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Miscellaneous
Thread ID:
01532992
Message ID:
01533000
Views:
54
>So I got this to work only after manually adding items with AddItem(). If I use a data source it doesn't work.
>
>I suppose in hindsight that makes sense - a data source can update and blow away the order, but it's still kinda weird that it would even let you do this.
>
>Thanks for the feedback and the PictureSelectionDisplay - checking that out now.



Yes - I have tested with AddItem()
_______
>+++ Rick ---
>
>>>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,
>>
>>Works for me
>>
>>If you want to see the image once you have selected an item, set PictureSelectionDisplay to a value > 0
Gregory
Previous
Reply
Map
View

Click here to load this message in the networking platform