Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Listview w/ Checkboxes - Width?

Status
Not open for further replies.

jolamb42

Programmer
Aug 23, 2001
26
US
Hello!

I am using a listview control with checkboxes to display a list of items the user can check or uncheck.

The properties of my listview are set as follows:
View = 2 - lvwList
Arrange = 0 - lvwNone
LabelEdit = 1 - lvwManual
BorderStyle = 1 - ccFixedSingle
Appearance = 1 - cc3D
OLEDragMode = 0 - ccOLEDragManual
OLEDropMode = 0 - ccOLEDropNone
HideColumnHeaders = False
HideSelection = True (and I've tried False)
LabelWrap = True (and I've tried False)
MultiSelect = False
Enabled = True
AllowColumnReorder = False
Checkboxes = True
FlatScrollbar = False
FullRowSelect = True (and I've tried False)
Gridlines = False
HotTracking = False
HoverSelection = False

My problem is that, no matter what width/height I set my listview to, the text displays in one set length. So, most of my text is being cut off! Does anyone know how to make the text next to my checkboxes in the listview wider??

Any help is greatly appreciated! Thanks in advance!

Jolynn
 
Padd them all with spaces. i.e. If your longest enntry is 25 characters long set each of the text to be padded with spaces up to 25 characters long. Craig, mailto:sander@cogeco.ca

"Procrastination is the art of keeping up with yesterday."

I hope my post was helpful!!!
 
Craig,

Thanks for the response. I tried adding extra spaces at the end of my text and that didn't work.

If I can't get the listview to work, I may just use a tree view w/ checkboxes and align all my nodes to the left.

Any other suggestions?

Thanks!
Jolynn
 
Why not use a listbox instead of a listview.

In the listview isn't their a setting for column width? Craig, mailto:sander@cogeco.ca

"Procrastination is the art of keeping up with yesterday."

I hope my post was helpful!!!
 
The ColumnHeaders tab on the Property Pages for the Listview allows setting of width per column.
Or, by code:
lv.ColumnHeaders(1).Width = 100
 
agreed
Code:
on error goto [URL unfurl="true"]www.tek-tips.com[/URL]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top