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 665333
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T23:41:47+00:00 2026-05-13T23:41:47+00:00

I have a combobox that I have Enabled = false. When that is the

  • 0

I have a combobox that I have Enabled = false. When that is the case it causes it to shade to a grey. I was wondering if there was a way I could keep the checkbox background color as cornsilk while it is not Enabled?

The situation is that I have a form that I will refresh with data when an item is selected. If the user selects to edit the record I enable the form to accept changes and since it is mainly textboxes I just change the readonly property of those. But the combobox looks different so I want to see what I can do to make it stay the same like the rest of the form…

Any ideas?

  • 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-05-13T23:41:48+00:00Added an answer on May 13, 2026 at 11:41 pm

    I would simply hide it with a TextBox over it and setting its Visible property to false. Then, you your user click the Edit button, you hide your TextBox and show your ComboBox with its Visible property set to true.

    Perhaps you wish to update your TextBox.Text property by setting its value to the ComboBox.SelectedItem property value on the SelectedItemChanged() event handler.

    Let’s suppose the following:

    ComboBox cb = new ComboBox();
    // Position, size and other properties are set through design.
    cb.SelectedIndex = 0; // Forces selection of first item for demo purposes.
    
    TextBox tb = new TextBox();
    tb.Size = cb.Size;
    tb.Position = cb.Position;
    tb.Text = cb.SelectedItem.ToString();
    tb.Visible = true;
    tb.Readonly = true;
    
    cb.Visible = false;
    

    Then, clicking the Edit button:

    private void EditButton_Click(...) {
        tb.Visible = false;
        cb.Visible = true;
    }
    

    And make your TextBox.Text property value follow your SelectedItem:

    private void ComboBox_SelectedIndexChanged(...) {
        tb.Text = cb.SelectedItem.ToString;
    }
    

    And you would only do the reverse of your EditButton_Click() event handler to bring back your form in read-only mode.

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

Sidebar

Related Questions

I have a ComboBox that I set up like this: this.cmbCustomerJob.DisplayMember = display; this.cmbCustomerJob.AutoCompleteMode
I have a Flex ComboBox that gets populated by a dataprovider all is well...
I want to have a select-only ComboBox that provides a list of items for
I have a combobox on my form that is bound to a generic list
I have a radajaxpanel that is populated with the selected item from a combobox
I have a listview with a DataTemplate that has a ComboBox. I want the
I have a WPF combobox that I would like to bind to an observable
I have a simple ComboBox that has some simple values. I'm trying to do
i have combobox (in fact, several of them), with elements that are added dynamicly.
I have a function that presents the user a combo-box. def select_interface(interfaces) list_box :items

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.