Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8528293
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T08:46:09+00:00 2026-06-11T08:46:09+00:00

I have found what seems to be an easy solution to disable certain items

  • 0

I have found what seems to be an easy solution to disable certain items in a ComboBox in here. It states:

You can disable an item in a list box or combo box by adding a single
backslash to the beginning of the expression.

However if I write

testBox.Items.Add("\Test item");

or

testBox.Items.Add(\"Test item");

it gives a syntax error in VS2010. Maybe this function has been disabled in later than 2005 versions?

If I put an item through a VS2010 designer like this

\Test item

or I write

testBox.Items.Add("\\Test item");

then it appears with a backslash and not is disabled.

Thus my question is: is this method somehow available and I just fail to understand how to use it or I do have to create a custom ComboBox to achieve my goal (in title)?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T08:46:10+00:00Added an answer on June 11, 2026 at 8:46 am

    sadly is it not possible for the combobox control.

    I would recommend to just remove the item from the combobox list instead of trying to disable it.

    with one of those 3 ways:

    // To remove item with index 0:
    comboBox1.Items.RemoveAt(0);
    // To remove currently selected item:
    comboBox1.Items.Remove(comboBox1.SelectedItem);
    // To remove "Tokyo" item:
    comboBox1.Items.Remove("Tokyo");
    

    If you absolutely need to disable items, you will need to create a custom combobox.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am doing some performance testing and have found that SQL seems to be
I have found Okapi Similarity measure can be used to calculated document similarity from
Seems like in Perl this should be easy or a module, but I have
Update: I still haven't found any easy and good enough solution for mailinglists. We
I have a head aching problem that I can't seem to find an easy
I seem to have found a bug in jQuery UI that duplicates dragged elements
I have done a load of searching but haven't found anything. There seem to
I have found that I have no problem using require to load something like
I have found many great answers to this from a year ago (when it
I have found this link: http://www.jfree.org/forum/viewtopic.php?f=3&t=6314 Its back in 2007 where they agree that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.