Set ColumnWidth in a table?

ControlFreak
11-11-2006, 04:14 PM
How do you set column width on a table in VWD2005? This column has 2 cell
and the rows can change. I want the right column to be small.

I do not know what ColumnSpan does. The table looks the same at runtime no matter what I set it at.

Dim tr As New TableRow
'Repeat for each cell on the row
Dim tc1 As New TableCell
tc1.ColumnSpan = 4
tc1.Text = ValueList(i)
tr.Cells.Add(tc1)

'Repeat for each Row in the table
ObjectTable.Rows.Add(tr)

'Repeat for each cell on the row
Dim tc2 As New TableCell
tc2.ColumnSpan = 4
tc2.Text = ValueList(i + 1)
tr.Cells.Add(tc2)
'Repeat for each Row in the table
ObjectTable.Rows.Add(tr)

wayneph
11-13-2006, 10:08 AM
ColumnSpan only changes things if there are different amounts of cells in the different columns. What you'll need to do is change the width of the cell. You can HardCode it to something like 100px, or make is grow and shrink with the page by using something like 10%.

If you don't specify a column width, the HTML will adjust it self to best fit the contents of your table.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum