Anywhere add something like.. this (as example):
> Where (within the CustomControl) should code to wire up base on the
> Custom Property for the Label.Text and TextBox.DataBindings be
> inserted?
>
> "Alex Meleta" wrote:
>
>> Hi Patrick,
>>
>> If you override Text propery of user control (or create another
>> property) you can put the code to update other controls. Or create
>> two properties for both databindings.
>>
>> P> And for the CustomControls Label.Text and TextBox.DataBindings to
>> be
>> P> updated automatically.
>> But, do you want to update other bindings by setting only one?
>> Regards, Alex
>> [TechBlog]
http://devkids.blogspot.com >> P> Can you elaborate a little bit more?
>> P>
>> P> I have
>> P> 1) created a .Net 2TestCustomControl in VS2005
>> P> 2) Dragged a Label into the Component designer
>> P> 3) Dragged a Textbox into the Component designer
>> P> What I want is to be able to do something like
>> P>
>> MyTestControl.DataBinding.Add("Text",myDataTable["myTable"],"myField"
>> P> );
>> P> And for the CustomControls Label.Text and TextBox.DataBindings to
>> be
>> P> updated automatically.
>> P>
>> P> What code do I have to write within the Custom Control to achieve
>> P> this?
>> P>
>> P> "Alex Meleta" wrote:
>> P>
>>>> Hi Patrick,
>>>>
>>>> You can create a custom control to combine in it other controls.
>>>>
>>>> Regards, Alex
>>>> [TechBlog]
http://devkids.blogspot.com >>>> P> I have a WinForms app, with each forms having many Text-boxes
>>>> that
>>>> P> bind to a DataTable.
>>>> P>
>>>> P> Associate with each Textbox would be a (text) label. Is there
>>>> any
>>>> P> simple way such that I can "bind" the Text labels to the
>>>> TextBoxes,
>>>> P> so I can dynamically set each Label.Text property rather than
>>>> having
>>>> P> to hard-wire the Label.Text for each Label for textbox?
>>>> P