Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Listbox colors

Listbox colors

Scheduled Pinned Locked Moved Visual Basic
csharpquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Silver Grey
    wrote on last edited by
    #1

    Is there an easy way to alternate forecolors in a listbox simular to datagrids in vb.net ???

    silver-gray

    D 1 Reply Last reply
    0
    • S Silver Grey

      Is there an easy way to alternate forecolors in a listbox simular to datagrids in vb.net ???

      silver-gray

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      Silver-Grey wrote:

      Is there an easy way

      What's easy for us may not be easy for you. There is no support for this built into the ListBox control, so you'd either have to find a replacement control that supports this, or create your own ListBox control and ownerdraw the ListBox to get this effect. Since you'd have to supply the Fore/BackColor's for the even and odd rows, you'd probably want to start by creating your own ListBox class so you can expose these properties. You can Google for "ownerdraw listbox vb[^] for examples.

      Dave Kreskowiak Microsoft MVP - Visual Basic

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups