mmiller039
Member
- Joined
- Dec 16, 2008
- Messages
- 8
- Programming Experience
- Beginner
I have a class that contains a couple of TextBoxes and a couple of Labels, I wangt to add these dynamically to a window and then add them to the new instance of the class. I then want to watch for a TextChange in either of the TextBoxes. Bellow is the class I am using, but get error "Handles clause requires a WithEvents variable defined in the containing type or one of its base types" and unfortunately this is all quite new to me so am not sure how to go about doing this.
VB.NET:
Public Class Spread
' TextBox and Label declaration
Public ratioA, ratioB As TextBox()
Public sizeL1, sizeL2 As Label()
Private Sub bid_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles bid.TextChanged
End Sub
End Class