Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old March 9th, 2005, 12:51 PM
Registered User
Join Date: Mar 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Combo box items not displaying

I have a simple combo box with some values in it for the drop down. I can't see those values inside of the drop down but they are there, its like the font is set to clear because i've tried changing the font color and background color but still can't see a thing. I am able to select a value from the drop down even tho I can't see it and it will appear in the text field.

I've create a solution with just a combo box and some values inside of it and it still doesn't work. I've downloaded some examples and they don't work. Is there a setting on my .NET which is doing this? I've tried putting a refresh for the combo box and that doesn't work.

Old March 11th, 2005, 05:27 PM
Authorized User
Join Date: Mar 2005
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to aehb

I think you may try to uninstall and reinstall the Visual Studio .NET or may be the windows itself, I don't know, that may solve the problem, good luck :)
Old March 14th, 2005, 05:41 AM
Friend of Wrox
Join Date: Jun 2003
Posts: 453
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via AIM to Ankur_Verma Send a message via MSN to Ankur_Verma

Make a new application and put a combobox in it and add items to it thru the ITEM COLLECTION property.
If it shows the items correctly then you know that the problem lies in your program only. try it.
Do get back if the problem persists.

Ankur Verma
Old March 22nd, 2005, 04:13 AM
Registered User
Join Date: Mar 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts

Try this...
using System;
using System.Windows.Forms;
using System.Drawing;
public class MyForm : Form {
public MyForm() {
            System.Windows.Forms.ComboBox cb = new System.Windows.Forms.ComboBox();
              cb.Location = new Point(45,80);
              cb.Size = new Size (232,20); 
              cb.Font = new Font ("Verdana", 10);
              cb.Text= " Select One Option ";
              cb.Items.Add("Less than 6 Months");  
              cb.Items.Add("From  6 Months To 2 Years");  
              cb.Items.Add("From  2 Months To 5 Years");  
              cb.Items.Add("From  5 Months To 10 Years");  
              cb.Items.Add("Above 10 Years");  
public static void Main(string[] args) {
MyForm f = new MyForm();

Similar Threads
Thread Thread Starter Forum Replies Last Post
put mailto: links on list items in a combo box? webwolf Flash (all versions) 0 September 12th, 2008 08:01 AM
Combo box to display items from parent combo box Gini Visual Studio 2008 0 June 18th, 2008 12:30 AM
Combo box choice creating filtered combo box stevensj5 Access 11 September 13th, 2007 11:33 AM
Displaying drop down menus on the top of Combo box karunkumar_g Javascript 3 December 14th, 2005 01:46 PM
displaying 6 items only having 20 items Lakshmi KS VB Components 1 February 17th, 2004 10:34 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.