Results 1 to 2 of 2

Thread: Listview strikes again

  1. #1

    Thread Starter
    Member
    Join Date
    May 2001
    Posts
    39

    Listview strikes again

    Hi

    I use one of the methods of Listview to add columns to the control(Ex: Listview.Columns.Add("Name", width, horizontalalignment)), and Microsoft documention explain that -1 and -2 are valid values to set the width parameter, respectively, to size the column to the largest subitem or columnheader caption.
    Meanwhile when i set the width parameter to that values i only get a mega column.

    Anyone have a explanation ?

  2. #2
    Lively Member
    Join Date
    Aug 2001
    Posts
    65
    I don't know about the -1 as all this does is make the column real small but the -2 sets the column headers to the width of the text in the headers not the items in the rows.....they will be truncated to fit the width of the headers.

    The last column header will take up the full space thats remaining depending on how big a listview you made.

    Post your code if your having trouble so we can see what it is your doing and someone may be able to give you an answer to your problem.

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