Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default 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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Coloum Width | OS Problem François Lépine Excel Programming 0 April 4th 05 05:43 PM
disable listitem Roland Excel Programming 2 December 13th 04 08:49 PM
Problem with Application.Width Leo Excel Programming 2 February 2nd 04 09:22 PM
Width problem with Form David Coleman Excel Programming 3 January 2nd 04 03:07 PM
Problem width width-property Tom Excel Programming 2 August 23rd 03 03:45 AM


All times are GMT +1. The time now is 12:38 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"