Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

combo box always showing record in white color???

Status
Not open for further replies.

ahnugroho

Programmer
Jan 29, 2003
45
ID
Hi..
I was working around 2 days to solve this problem!

I have combo box on the form which have the record from this code:

cboWorkCenter.Items.Clear()
Dim cmWC As New SqlCommand
Dim drItem As SqlDataReader
cmWC.CommandType = CommandType.Text
cmWC.Connection = cnFS
cmWC.CommandText = "SELECT ItemNumber FROM FS_Item"
cnFS.Open()
drItem = cmWC.ExecuteReader(CommandBehavior.CloseConnection)
Do While drItem.Read
cboWorkCenter.Items.Add(drItem.GetString(0))
Loop
cnFS.Close()
Me.Refresh()

I use data reader to populate record for my combo box.
the code was run normally but when I click to select the record, all record shows in white color and I cannot see the character. but when I click particular record (random), the record is selected and shows on Combo box.

I just re-install my PC but does not solve problem.

Please help!

thanks
ahnugroho
 
Sounds like you have set the forecolor property of the combobox to White. It shows up only when highlighted.

Try setting it to Black.


Bob Boffin
 
Hi bboffin,

I was check the forecolor property and change to another color, but still does not work. This is happen only on my PC.

If I use another PC, it will working fine!

rgds
ahnugroho
 
I have seen this behaviour also on a listbox. The problem seems to be in XP. Go to the display properties, and set the font size to large and apply, then change back to normal and apply. Suddenly the contents of the list box becomes visible. Like you I have only seen this happen on one pc.



Sweep
...if it works, you know the rest..
Always remember that Google is your friend

curse.gif
 
Hi SqueakinSweep,

I follow your suggestion, it's working for a minute, but after I close my Application, it's back to the problem!
 
Hi ThatRickGuy...
Yes, I have McAfee 8.0 installed with Patch Version=1

Sorry,i've got sick for 2 weeks, just get connect the net today!

ahnugroho
 
Patch McAfee. There was a patch they release a few months ago that caused a lot of strange behavior in .Net apps. Anytime I see weird behavior like this, and McAfee is on the machine, that's my first step.

-Rick

VB.Net Forum forum796 forum855 ASP.NET Forum
[monkey]I believe in killer coding ninja monkeys.[monkey]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top