Results 1 to 2 of 2

Thread: checkbox with header or listbox with header

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2006
    Posts
    260

    checkbox with header or listbox with header

    i am trying to add header to a checkboxlist or header to a listbox but haven't been successful.
    what i want is this
    cateogry1
    chbox1 chbox2 chbox3
    cateogry2
    ...........................................

    for list box its
    header1
    item(smaller font)
    item
    header2
    ...........


    please if anyone knows how to do this help me. thank you very much

  2. #2
    Addicted Member billyblue's Avatar
    Join Date
    Dec 2008
    Location
    Belfast
    Posts
    203

    Re: checkbox with header or listbox with header

    Not sure if this will help you but I used this for a drop down list. Maybe something similar could be used in your examples.

    vb Code:
    1. 'Formatting the Drop Down List.
    2.  
    3.         Dim i As Integer
    4.  
    5.         For i = 0 To ddlAction.Items.Count - 1
    6.  
    7.             If ddlAction.Items.Item(i).Value <> 0 Then
    8.  
    9.                 ddlAction.Items.Item(i).Attributes.Add("style", "color:gray")
    10.  
    11.             End If
    12.  
    13.         Next

    Then I gave all my headers a value of 0. So non headers were formatted with the font color gray. You could use something like this just changing the attribute.

    Good luck with it

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