Hi... I use a lot of DataGridViewTextBoxCells. I'm trying to build a "DataGridViewTextBoxCell" class to simplify the following code:
to the following code:
Is this a possible action?
I try to build a class object with a "Public Function New" declaration, and get the message "Constructor must be declared as a Sub, not a Function"
Code:
Dim dgvRow As New DataGridViewRow
dgvCell = New DataGridViewTextBoxCell()
With dgvCell
.Value = "hi" : .Style.BackColor = dgvRowBackcolor : dgvRow.Cells.Add(dgvCell)
End With
to the following code:
Code:
Dim dgvRow As New DataGridViewRow
dgvRow.Cells.Add(New myDGVTextbox("hi", dgvRowBackcolor))
Is this a possible action?
I try to build a class object with a "Public Function New" declaration, and get the message "Constructor must be declared as a Sub, not a Function"