www.webdeveloper.com
Results 1 to 2 of 2

Thread: Formatting ListBox

  1. #1
    Join Date
    Jul 2003
    Posts
    69

    Formatting ListBox

    I am having difficulties with formatting listbox. I have 3 coulumns and 4 rows. such as

    Name Phonenumber Married
    Tim 123-4569 Y
    Jack 546-8965 N
    Phil 596-8745 Y

    So now I would like to display these two colums so that 1st row the header is going to be bold and underlined.

    For rest of the rows, 1st coulmns will be right justified, 2nd column will be Left justified and 3rd column will be center justified.

    I am using VB.NET and doing windows application. I tried the following code:

    dim fmt as stirng

    fmt = {0,10}{1,20}{2,30}
    lstbox.items.add(string.format(fmt,"Name","Phone","Married"))

    But I am not getting the right allignement.

    Can you suggest me any online tutorial about ListBox formatting or solve the problem.

  2. #2
    Join Date
    Nov 2002
    Location
    Auburn, AL
    Posts
    9,222
    I think this is a compound problem. Here is an idea, use a loop, then break each of those little strings up and add non breaking praces where neccessary to make each the same length, then populate it into an html list box. Then make sure you use a font in which the letter widths are not going to cause problems. That is just a thought.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles