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. C#
  4. ComboBox change font on specific item..

ComboBox change font on specific item..

Scheduled Pinned Locked Moved C#
json
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.
  • A Offline
    A Offline
    akkram
    wrote on last edited by
    #1

    Hello. I have a combobox with a couple of items in it. Instead of having a label on the form that describes the content of the combobox id like to use the textproperty for this purpose. So far so fine. But now I want to change the textproperty of the combobox to italic but leave the rest of the items in the combobox as regular text. Anyone knows how I can do this. As it is now when i change the combobox.Font.Italic prop all the items in the collection is set to italic. //Thx

    D 1 Reply Last reply
    0
    • A akkram

      Hello. I have a combobox with a couple of items in it. Instead of having a label on the form that describes the content of the combobox id like to use the textproperty for this purpose. So far so fine. But now I want to change the textproperty of the combobox to italic but leave the rest of the items in the combobox as regular text. Anyone knows how I can do this. As it is now when i change the combobox.Font.Italic prop all the items in the collection is set to italic. //Thx

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

      It's all or nothing using the standard control. If you wanted more control over the textbox and the list fonts, you'd have to create your own version that supports this, supplying the properties to be set for each side of the control and supplying all the rendering code to draw the textbox and the drop down list.

      A guide to posting questions on CodeProject[^]
      Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
           2006, 2007

      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