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!

TreeView Width in tvwList mode

Status
Not open for further replies.

CmPaiva

Programmer
Nov 13, 2002
124
PT
Hi Everybody.

Does anyone knows how to set the item width, when the TreeView is in List mode? I would like to have a smaller width then the default, in order to show all items without the scrollbar,but i can't find a way of doing it.
Any API???

Thanks in Advance,
Carlos Paiva
 
PankaAjr,

Thanks for your wise point.Sure it is a ListView, and I mistakly name the control in this forum. Anyway, the point is how to setup, the listview in List Mode, the width of columns. In Listbox's, we setup the number of columns to be shown in the client area, but i can´t find such a thing or a columnwidth property. Do you know how to do it? (anyway, i switched to a listbox wich gave me a similar view as i want), but i would like to know any work around for this.
Thanks for your time anyway,


Carlos Paiva
 
Hi Carlos,

Through this command u can change & identify the width of the each column-

ListView1.ColumnHeaders(1).Width = 1600

Here 1 indicate the column index. Be remember column index always start from the 1.

Hope it will solve your problem

Thanks
Pankaj

Senior Software Engineer,
Infotech Enterprises Limited
Hyderabad, Andhra Pradesh, India.
URL :
 
Hi, this I know, but it is valid only when ListView is in REPORT mode (=lvwReport).
What i need to setup, is the width of intrinsic columns in the LIST (=lvwList) Mode.In this mode, control populates with items in a matrix of items in several columns. I realy don't know if this is possible, or if control computes column sizes as a function of fontsize used in the items!???.

Sorry by my late answer, but I've been out for several days.

Thanks

Carlos Paiva
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top