Results 1 to 3 of 3

Thread: [RESOLVED] Changing the backround Color in a combobox list

  1. #1

    Thread Starter
    Addicted Member Veritas2.0's Avatar
    Join Date
    May 2008
    Posts
    181

    Resolved [RESOLVED] Changing the backround Color in a combobox list

    Basically I have a program that will let the user indicate the status of a development project in several places. The status of each step in the process is color coded (i.e. Red = stopped, Yellow = on hold, Blue = in progress, green = complete, white = not started).

    Ideally I would like to have a drop down menu the user can simply select the appropriate color from. Right now I'm using a bunch of combo boxes in a control array. However I can't figure out if/how to change the color of items in the list without changing the whole combo box.

    Any suggestions/work arounds?

    This is an example of what I'm trying to do.
    Attached Images Attached Images  
    Simple little bugs 13 : Me 1

    Law of Bugs - That one bug you missed will be found almost immediately, by your customer.

    I wonder if anyone has ever asked for a User Surly interface?

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Changing the backround Color in a combobox list

    Its not a simple task. You need to subclass the combobox and do the drawing yourself. There may be a thread on how to somewhere on the Forums.

    What about just using a image combobox and setting the display rectangly to the full width of the combo?
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  3. #3

    Thread Starter
    Addicted Member Veritas2.0's Avatar
    Join Date
    May 2008
    Posts
    181

    Re: Changing the backround Color in a combobox list

    Exactly what I was looking for and a whole lot easier than using comboboxes. Many thanks RobDog.
    Simple little bugs 13 : Me 1

    Law of Bugs - That one bug you missed will be found almost immediately, by your customer.

    I wonder if anyone has ever asked for a User Surly interface?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width