A
André
Hi,
I was wondering whether there is a better way to program code than this:
assume i need to create a lot of TabelCell with the same characterists
(HorizontalAlign, BackColor etc ...).
I can't use a loop (for/next) because the 'Text' is always different. What i
did was:
Dim c as TableCell
Dim r as TableRow
....
'first cell
c = New TableCell
c.HorizontalAlign = HorizontalAlign.Center
c.BackColor = Drawing.Color.LightSteelBlue
c.Text=a
r.Cells.Add(c) ' add to row
'next cell
c = New TableCell
c.HorizontalAlign = HorizontalAlign.Center
c.BackColor = Drawing.Color.LightSteelBlue
c.Text=b
r.Cells.Add(c) ' add to row
etc ...
Is it not possible to define once all the characteristics of c instead of
repeating them for each cell?
Thanks
André
I was wondering whether there is a better way to program code than this:
assume i need to create a lot of TabelCell with the same characterists
(HorizontalAlign, BackColor etc ...).
I can't use a loop (for/next) because the 'Text' is always different. What i
did was:
Dim c as TableCell
Dim r as TableRow
....
'first cell
c = New TableCell
c.HorizontalAlign = HorizontalAlign.Center
c.BackColor = Drawing.Color.LightSteelBlue
c.Text=a
r.Cells.Add(c) ' add to row
'next cell
c = New TableCell
c.HorizontalAlign = HorizontalAlign.Center
c.BackColor = Drawing.Color.LightSteelBlue
c.Text=b
r.Cells.Add(c) ' add to row
etc ...
Is it not possible to define once all the characteristics of c instead of
repeating them for each cell?
Thanks
André