format Listview Items

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • thomasp@msala.net

    #1

    format Listview Items


    Can I format the items in a listview differently? Use different fonts and
    colors for different item.
    VB2005

    Thanks,

    Thomas

    --
    Posted via NewsDemon.com - Premium Uncensored Newsgroup Service
    ------->>>>>>http://www.NewsDemon.c om<<<<<<------
    Unlimited Access, Anonymous Accounts, Uncensored Broadband Access
  • Phil

    #2
    Re: format Listview Items

    Yes you can. This control has a listitems property that lets you work with
    the individual items.

    Rgds, Phil

    <thomasp@msala. net> wrote in message
    news:42f50fe8$0 $29064$b9f67a60 @news.newsdemon .com...[color=blue]
    >
    > Can I format the items in a listview differently? Use different fonts and
    > colors for different item.
    > VB2005
    >
    > Thanks,
    >
    > Thomas
    >
    > --
    > Posted via NewsDemon.com - Premium Uncensored Newsgroup Service
    > ------->>>>>>http://www.NewsDemon.c om<<<<<<------
    > Unlimited Access, Anonymous Accounts, Uncensored Broadband Access[/color]


    Comment

    • Herfried K. Wagner [MVP]

      #3
      Re: format Listview Items

      <thomasp@msala. net> schrieb:[color=blue]
      > Can I format the items in a listview differently? Use different fonts and
      > colors for different item.
      > VB2005[/color]

      Make sure the row's first item's 'UseItemStyleFo rSubItems' property is set
      to 'False' when assigning different fonts and colors to sub items.

      --
      M S Herfried K. Wagner
      M V P <URL:http://dotnet.mvps.org/>
      V B <URL:http://classicvb.org/petition/>

      Comment

      • thomasp@msala.net

        #4
        Re: format Listview Items

        I used this, it seems to be doing what I want.

        Dim x As Integer = 0
        For Each dsColumn As DataColumn In ds.Tables(0).Co lumns
        lstAvailable.It ems.Add(dsColum n.ColumnName)
        Select Case dsColumn.Column Name
        Case Is = "Db"
        lstAvailable.It ems(x).ForeColo r = Color.Red
        Case Is = "Velocity"
        lstAvailable.It ems(x).ForeColo r = Color.Red
        End Select

        x += 1
        Next

        --
        Posted via NewsDemon.com - Premium Uncensored Newsgroup Service
        ------->>>>>>http://www.NewsDemon.c om<<<<<<------
        Unlimited Access, Anonymous Accounts, Uncensored Broadband Access

        Comment

        Working...