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!

ListBox ColumnWidth property

Status
Not open for further replies.

Nassu

Programmer
Nov 22, 2001
17
I have a quite silly problem.

My customer liked very much an form, where I use an multicolumn listbox to show him a query_based_table. Actually it is store of sawmill packages - each row is a package with attributes and in the end of row there are columns with numbers of various length tables. I modyfy this listbox properties dynamically and now it is quite complicated form, where they are able to sort data in many ways, select, book packages, etc...

PROBLEM: As there are package attribute columns have different widths, I create new .ColumnWidth property string for each query. Now the store have growed and I have reached to the length of 256 bytes in this ColumnWidth property string. So I am not able to show all columns any more.

Is there any trick to circumvent this restriction, or describe this columnwiths in some way as 3;2;3;(5x)2;...

Thanks for any good suggestion. problem is not critical. Customer actually are satisfied even with this solution also - he just selects subset of store. But for me it is a bit of proffesional programmers proudness of presenting good solution...

Oleg
 
One thing you can do to shorten the property string is to omit some of the sizes, e.g. "3;;3;...". For each omitted value, Access uses a default value that it calculates from the datatype and (for Text fields) size of the corresponding field.

A good workaround might be simply to truncate the string after 255 characters. The remaining columns will get default widths, but the user will be able to resize them if necessary.

Rick Sprague
Want the best answers? See faq181-2886
To write a program from scratch, first create the universe. - Paraphrased from Albert Einstein
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top