TextBox Binding Question

R

Rob Panosh

Hello,

I am trying to bind a text box with my derived class (listed below) using
the designer. I want to be able to add this class to my toolbox, drop onto
a form, and from the designer click on the textbox and bind the firstname
property of the customer class. Is this possible? Any help would be
greatly appreciated.

Thanks,
Rob Panosh

Sample Class
-------------
Class Customer

Private _FirstName As System.String

Public Property FirstName()
Get
Return Me._FirstName
End Get

Set(ByVal Value)
Me._FirstName = Value
End Set

End Property

Public Sub New()

End Sub

End Class
 
M

Mohamoss

Hi Rob
You can build your own textbox control that drive from the textbox class
(user control project). Within the class of your UserControl you can
incorporate the employee class to add the functionality you want. Then you
need to build that control, add reference of it to your project (the
windows application project that will use your control) and use it as a
normal control within your project (it will be under the user control tab).

hope that helps
Mohamed Mahfouz
MEA Developer Support Center
ITworx on behalf of Microsoft EMEA GTSC
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top