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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T15:55:37+00:00 2026-05-10T15:55:37+00:00

How can I set the background color of a specific item in a System.Windows.Forms.ListBox

  • 0

How can I set the background color of a specific item in a System.Windows.Forms.ListBox?

I would like to be able to set multiple ones if possible.

  • 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. 2026-05-10T15:55:38+00:00Added an answer on May 10, 2026 at 3:55 pm

    Probably the only way to accomplish that is to draw the items yourself.

    Set the DrawMode to OwnerDrawFixed and code something like this on the DrawItem event:

    private void listBox_DrawItem(object sender, DrawItemEventArgs e) {     e.DrawBackground();     Graphics g = e.Graphics;      g.FillRectangle(new SolidBrush(Color.Silver), e.Bounds);      // Print text      e.DrawFocusRectangle(); } 

    The second option would be using a ListView, although they have an other way of implementations (not really data bound, but more flexible in way of columns).

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

Sidebar

Related Questions

Normally with Java Swing you can set the background color of a button with:
How can we set border and background color in the WPF grid control ,
How can i add a specific color to my navigation controller background? All i
I can set the background color of the current page using: document.body.style.background='red'; Is there
Users can set the background-color of a button through a textbox that accept RGB
i can set the stage's background color, etc., using a SWF metadata tag: [SWF(width=1024,
ok i know i can set a textview's background color by textview.setBackgroundColor(R.color.darkgrey) or some
I have a page where the background colour can be set dynamically. In some
Can I set a different background-image CSS attribute to my <BODY> tag depending on
The background-position property can be set in a variety of ways such as top

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.