+ Reply to Thread
Results 1 to 2 of 2

Problem with ListItem Width

  1. #1
    allenj3
    Guest

    Problem with ListItem Width

    I am working with a listview control under the .view = lvwReport setting. I
    add one column header and set the column width to 200. When I add a listitem
    to the listview, the width of the listitem is well under 200 and is not
    displaying the entire text of the listitem. The following is an example of
    the code I'm using...

    Dim LV As ListItem
    Dim strLabel

    Set LV = Userform1.ListView1
    LV.ColumnHeaders.Add 1, , "", 200
    strLabel = "Concept Test"

    LV.ListItems.Add 1,,strLabel

    The listitem appears under the first (and only) column header as "Concept
    Te..." instead of the full text and the listitem.width property equals 54.
    Why is the columnheader width equal to 200 yet the listitem.width is only
    equal 54 (and less than the necessary length to capture the entire text)?
    Also frustrating is the fact that the listitem.width property is read-only.

    Thanks in advance for any help!

    Jay

  2. #2
    allenj3
    Guest

    RE: Problem with ListItem Width

    I seem to have partially answered my own question. If I set the
    listview.fullrowselect property to True, the entire text gets displayed.
    Still not sure why this was happening, but I've got code that works now.

    Thanks.

    "allenj3" wrote:

    > I am working with a listview control under the .view = lvwReport setting. I
    > add one column header and set the column width to 200. When I add a listitem
    > to the listview, the width of the listitem is well under 200 and is not
    > displaying the entire text of the listitem. The following is an example of
    > the code I'm using...
    >
    > Dim LV As ListItem
    > Dim strLabel
    >
    > Set LV = Userform1.ListView1
    > LV.ColumnHeaders.Add 1, , "", 200
    > strLabel = "Concept Test"
    >
    > LV.ListItems.Add 1,,strLabel
    >
    > The listitem appears under the first (and only) column header as "Concept
    > Te..." instead of the full text and the listitem.width property equals 54.
    > Why is the columnheader width equal to 200 yet the listitem.width is only
    > equal 54 (and less than the necessary length to capture the entire text)?
    > Also frustrating is the fact that the listitem.width property is read-only.
    >
    > Thanks in advance for any help!
    >
    > Jay


+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1