BUG: eVB: ComboBox Text Property Ignores ForeColor Property Value (262036)



The information in this article applies to:

  • Microsoft eMbedded Visual Basic 3.0

This article was previously published under Q262036

SYMPTOMS

The Text property of a ComboBox control ignores the value of the ForeColor property. Therefore, the text of the selected item in the ComboBox control is always black, while the items in the drop-down portion of the ComboBox match the value of the ForeColor property.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Open Microsoft eMbedded Visual Basic 3.0.
  2. Create a new Windows CE for the Pocket PC project. Form1 is created by default.
  3. Add a ComboBox control and two CommandButton controls to Form1.
  4. Change the ForeColor property of the ComboBox to Red or choose any color from the color palette.
  5. Paste the following code into the code window for Form1:
    Option Explicit
    
    Private Sub Command1_Click()
        Combo1.ForeColor = &H4000&
    End Sub
    
    Private Sub Command2_Click()
        App.End
    End Sub
    
    Private Sub Form_Load()
        Command1.Caption = "Change to Green"
        Command2.Caption = "Exit"
        Combo1.AddItem "One"
        Combo1.AddItem "Two"
        Combo1.AddItem "Three"
    End Sub
    
    Private Sub Form_OKClick()
        App.End
    End Sub
    					
  6. Run the project on the device or the emulator. Note that the text in Combo1 is black even though you changed the ForeColor property at design time.
  7. Select an item from the drop-down list. Note that the items in the drop-down list match the color specified in the ForeColor property. However, the selected item changes to black.

Modification Type:MajorLast Reviewed:10/15/2002
Keywords:kbBug kbDSupport KB262036