# Difference between revisions of "WebListBox.ColumnWidths"

### From Xojo Documentation

m (Removed the illegal column width from the last example.) |
m |
||

Line 9: | Line 9: | ||

{{Description | {{Description | ||

|text = A list of comma separated values, with each value controlling the width of the associated column. A value can be an absolute value (in pixels), a percentage, a relative length expressed as "i*" where ''i'' is an integer, or an "*" that indicates "fill in the remaining width". If you use percentages, you can use non-integer values to specify fractions of a percent, e.g., 43.52%. The percentage value can be greater than 100%. }} | |text = A list of comma separated values, with each value controlling the width of the associated column. A value can be an absolute value (in pixels), a percentage, a relative length expressed as "i*" where ''i'' is an integer, or an "*" that indicates "fill in the remaining width". If you use percentages, you can use non-integer values to specify fractions of a percent, e.g., 43.52%. The percentage value can be greater than 100%. }} | ||

− | |||

==Notes== | ==Notes== | ||

Line 16: | Line 15: | ||

Without any column width specifications, the headers will be divided evenly. If there are fewer column widths specified than the total number of columns, the remaining columns will divide up the remaining width equally. | Without any column width specifications, the headers will be divided evenly. If there are fewer column widths specified than the total number of columns, the remaining columns will divide up the remaining width equally. | ||

− | |||

==Examples== | ==Examples== | ||

Line 25: | Line 23: | ||

Me.ColumnWidths = "100,100" | Me.ColumnWidths = "100,100" | ||

</rbcode> | </rbcode> | ||

− | |||

The following uses the * to specify the last column's width: | The following uses the * to specify the last column's width: |

## Latest revision as of 13:37, 14 August 2017

*aWebListBox*.

**ColumnWidths**=

*newStringValue*

**or**

*StringValue*=

*aWebListBox*.

**ColumnWidths**

New in 2010r4

Supported for all project types and targets.

A list of comma separated values, with each value controlling the width of the associated column. A value can be an absolute value (in pixels), a percentage, a relative length expressed as "i*" where *i* is an integer, or an "*" that indicates "fill in the remaining width". If you use percentages, you can use non-integer values to specify fractions of a percent, e.g., 43.52%. The percentage value can be greater than 100%.

## Notes

If you use pixels, the last column doesn't grow to the size of the rest of the ListBox. You should set the width of the last column to "*" and it will automatically take up the remaining width of the ListBox.

Without any column width specifications, the headers will be divided evenly. If there are fewer column widths specified than the total number of columns, the remaining columns will divide up the remaining width equally.

## Examples

The following creates two columns with 100 pixels per column:

The following uses the * to specify the last column's width: