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 column default width

Status
Not open for further replies.

Nassu

Programmer
Nov 22, 2001
17
I have a problem with quite sophisticated listbox application.

I have a lisbox with couple of fixed columns on left side and then variable number of fixed format columns on right side (sawmill tables stock - some fixed parameters and length_columns filled with amount of tables). Based on sort of crosstab query.

Problem is, that I set programmatically column widths in ColumnWidths property, but the string with list of column widths exceeds length of 256 bytes Listbox ColumnWidths propery restriction).
As a result the first 30-40 columns are displayed correctly with my predefined column widths, but then other columns (falling behind this column_with descripton 256bytes) are displayed with certain default column width (probably one inch).

Is it possible to change in some way (programmatically) this "default column width" for Listbox. Default column width in Access Tools->Options do not have any influence to Listbox column width.
The default column width of half of inch satisfies mee and makes my control really good-looking.

I do not want to change to grid control (which sounds reasonable) as there are a lot of specific VBA programming behind this form and Listbox control is included to any Access. MSFlexGrid needs regsitration and actually abovementioned problem is the only problem prevents me to take full flavour of this control.

Thanks in advance, Oleg
 
And a continuous subform isn't an option ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
I have though about this option also, but problem will be same as with grid control option.
There are lot of VBA, various ways search conditions, multiselects, etc... . Form itself have worked two years at least and my cutomer is extremely satisfied with this (they working with this like with Excel tabel, sorting selecting, cliking buttons, with various additional features).

So replacing control with anything other means anyway to change a bit interface and quite dramatic rewriting a code.

Thanks anyway
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top