BUG: Cannot Add Pictures into ComboBox in Init Event (169192)
The information in this article applies to:
- Microsoft Visual FoxPro for Windows 5.0
- Microsoft Visual FoxPro for Windows 5.0a
This article was previously published under Q169192 SYMPTOMS
In Visual FoxPro 5.0 or 5.0a, setting the Picture property of a ComboBox
object in the Init event of the object does not display pictures or icons
within the ComboBox. However, the pictures do appear in ComboBox objects
running under Visual FoxPro 3.0 and 3.0b.
RESOLUTION
Several workarounds exist for this behavior. First, you can place the
following code in the GotFocus event of the ComboBox object:
This.Picture(1)=Home()+"samples\graphics\bmps\assorted\balloon.bmp"
This.Picture(2)=Home()+"samples\graphics\bmps\assorted\cup.bmp"
You can also place the following code in the Refresh event of the ComboBox
object:
IF EMPTY(THIS.PICTURE(1))
THIS.PICTURE(1)=Home()+"samples\graphics\bmps\assorted\balloon.bmp"
THIS.PICTURE(2)=Home()+"samples\graphics\bmps\assorted\cup.bmp"
ENDIF
Finally, if you need to leave the original code in the Init of the
ComboBox, then place this code in the Activate event of the form:
IF EMPTY(THIS.combo1.PICTURE(1))
THIS.combo1.Init()
ENDIF
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article.
Modification Type: | Major | Last Reviewed: | 12/14/1999 |
---|
Keywords: | kbprb KB169192 |
---|
|