Is there a way to loop through the colors available on a web form? something like:
Sub subShowColors()
Dim intCnt As Integer = 0
Dim Color As System.Drawing.Color
Dim tHeaderRow As New TableRow()
Dim tHeaderCell As New TableCell()
For Each Color In System.Drawing.Color
Dim tRow As New TableRow()
Dim tCell As New TableCell()
tCell.Controls.Add(New LiteralControl(Color))
tRow.Cells.Add(tCell)
tblColors.Rows.Add(tRow)
Next
End Sub
I'm having trouble with the syntax.
Thanks
Rich
Sub subShowColors()
Dim intCnt As Integer = 0
Dim Color As System.Drawing.Color
Dim tHeaderRow As New TableRow()
Dim tHeaderCell As New TableCell()
For Each Color In System.Drawing.Color
Dim tRow As New TableRow()
Dim tCell As New TableCell()
tCell.Controls.Add(New LiteralControl(Color))
tRow.Cells.Add(tCell)
tblColors.Rows.Add(tRow)
Next
End Sub
I'm having trouble with the syntax.
Thanks
Rich