How to show Combo Box items in a different color or bold?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • JB

    How to show Combo Box items in a different color or bold?

    Hi All,

    I have a DataGridView in which some columns are combo boxes (i.e.
    DataGridViewCom boBoxColumn). I populate these Combo Boxes directly by
    using code like this:

    Dim NewCol As New System.Windows. Forms.DataGridV iewComboBoxColu mn
    NewCol.Items.Ad d("Item 1")
    NewCol.Items.Ad d("Item 2")
    NewCol.Items.Ad d("Item 3")

    I'd like to know if there's a way to show some items in a different
    color or bold font.

    Thanks
    JB
  • JB

    #2
    Re: How to show Combo Box items in a different color or bold?

    PS: I'm using VB.NET 2005 with framework 2.0

    Comment

    • Cor Ligthert[MVP]

      #3
      Re: How to show Combo Box items in a different color or bold?

      JB,

      With drawing you can do almost everything, be however aware that there are
      specialist who do this kind of things.

      I don't know your expirience but be aware that this needs often more lines
      of code than a complete solution.

      Cor

      "JB" <jb.brossard@gm ail.comschreef in bericht
      news:99ff4181-07d0-464f-bd8e-7d61fcdbf5f8@f6 3g2000hsf.googl egroups.com...
      Hi All,
      >
      I have a DataGridView in which some columns are combo boxes (i.e.
      DataGridViewCom boBoxColumn). I populate these Combo Boxes directly by
      using code like this:
      >
      Dim NewCol As New System.Windows. Forms.DataGridV iewComboBoxColu mn
      NewCol.Items.Ad d("Item 1")
      NewCol.Items.Ad d("Item 2")
      NewCol.Items.Ad d("Item 3")
      >
      I'd like to know if there's a way to show some items in a different
      color or bold font.
      >
      Thanks
      JB

      Comment

      • JB

        #4
        Re: How to show Combo Box items in a different color or bold?

        On 22 Apr, 04:10, "Cor Ligthert[MVP]" <notmyfirstn... @planet.nl>
        wrote:
        JB,
        >
        With drawing you can do almost everything, be however aware that there are
        specialist who do this kind of things.
        >
        I don't know your expirience but be aware that this needs often more lines
        of code than a complete solution.
        >
        Cor
        >
        "JB" <jb.bross...@gm ail.comschreef in berichtnews:99f f4181-07d0-464f-bd8e-7d61fcdbf5f8@f6 3g2000hsf.googl egroups.com...
        >
        Hi All,
        >
        I have a DataGridView in which some columns are combo boxes (i.e.
        DataGridViewCom boBoxColumn). I populate these Combo Boxes directly by
        using code like this:
        >
        Dim NewCol As New System.Windows. Forms.DataGridV iewComboBoxColu mn
        NewCol.Items.Ad d("Item 1")
        NewCol.Items.Ad d("Item 2")
        NewCol.Items.Ad d("Item 3")
        >
        I'd like to know if there's a way to show some items in a different
        color or bold font.
        >
        Thanks
        JB
        Hi Cor,

        Do you mean that the way to do this is to use owner drawn control or
        at least overriding the drawing method(s) on my conbo box control?

        Thanks
        JB

        Comment

        • Martin M

          #5
          Re: How to show Combo Box items in a different color or bold?

          DaisyCombo has very strong styling ability to the dropdown list.

          Could find it at www.springsys.com


          Hi All,
          >
          I have a DataGridView in which some columns are combo boxes (i.e.
          DataGridViewCom boBoxColumn). I populate these Combo Boxes directly by
          using code like this:
          >
          Dim NewCol As New System.Windows. Forms.DataGridV iewComboBoxColu mn
          NewCol.Items.Ad d("Item 1")
          NewCol.Items.Ad d("Item 2")
          NewCol.Items.Ad d("Item 3")
          >
          I'd like to know if there's a way to show some items in a different
          color or bold font.
          >
          Thanks
          JB

          Comment

          Working...