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 MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Listview problem - scrollbars

Status
Not open for further replies.

ZOR

Technical User
Jan 30, 2002
2,963
GB
Sorry to double the posting but I'm urgently needing an answer to a problem. As a listview control fills with items, is there a way to avoid the control changing its display from being a verticaly wanted list of items to one thats horizontal with horizontal scroll bar. If I had the choice it would remain the same and have a verticle scrollbar. Is this possible?
 
Not sure if this is what you require....

If you set the Arrange property of a listview to lvwAutoLeft, the list expands horizontally with a horizontal scroll bar.
If you set it to lvwAutoTop the list expands vertically with a vertical scroll bar.

 
The horizontal scroll bar in a list box is dependent on the data that fills it. If you are going to use the listbox you will need to limit the length of the data that you fill the list with or make the listbox wider. The other option would be to use a text box control and only allow a vertical scroll bar. Does that help at all? If you choose to battle wits with the witless be prepared to lose.
[machinegun][ducky]
 
Thanks GHolden and foada. I tried setting the property to ivyAutoTop and it made no difference. The control is wide enough for the items being put in the list, but when the list grows longer than the control it then flips into a horizontal format with horizontal scrollbars. Not knowing how to fix it I have made the control rectangular with enough size for items to get loaded without scrollbars comming in but its a bodge.
Re Textbox control, I have not worked with one and would not know where to start. It took long enough to make the listview work so I may just end up with second best. It was the listbox with checkboxes that fitted the bill. Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top