View Single Post
  #9 (permalink)  
Old May 14th, 2008, 02:51 PM
dhoyle dhoyle is offline
Registered User
 
Join Date: Mar 2008
Location: Eads, TN, USA.
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am posting the solution cause I am sure others may need it also.
When you have usercontrols within other usercontrols and need to make the control do something, you have to loop to first find the control.

ucSHip2 as a usercontrol loaded into the MainForm. I needed to change the text within the BindingNavigator1 which was located in ucShip2. I use a property Biz.RowSelectz to determine what the text should be.


Dim ctr2 As Control
        For Each ctr2 In MainForm.MainFormPanel.Controls
            If TypeOf ctr2 Is ucShip2 Then
                DirectCast(ctr2, ucShip2).BindingNavigator1.Focus()
                DirectCast(ctr2, ucShip2).BindingNavigator1.PositionItem.Text = Biz.RowSelectz + 1

            End If
        Next ctr2

Reply With Quote