Problem with ListItem Width

A

allenj3

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
 
A

allenj3

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top