Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
665
Child Tab Controls not being set through Parent when RibbonTab selected
posted
 I have a MDI parent form with a child form using your UltraToolbarsManager with the ribbon effect.
When the child form loads and the user selects a Ribbon tab and the "UltraToolbarsManager1_AfterRibbonTabSelected" method is called to then access a UltraTab control on the child form (see below) to set a Tab depending on which RibbonTab the user selected

(Parent MDI Form)
Private Sub UltraToolbarsManager1_AfterRibbonTabSelected(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinToolbars.RibbonTabEventArgs) Handles UltraToolbarsManager1.AfterRibbonTabSelected
          Dim bolAnswer As Boolean = Nothing

          Select Case e.Tab.Key
               Case "_mdichild.merge.ribbontab.key__ribbon_standard bun comparison"
                    frmBunOptimization.RibbonTabSelected = "Standard"
       
               Case "_mdichild.merge.ribbontab.key__ribbon_enhanced bun comparison"
                    frmBunOptimization.RibbonTabSelected = "Enhanced"


               Case "_mdichild.merge.ribbontab.key__ribbon_ardis settings"
                    frmBunOptimization.RibbonTabSelected = "Ardis Settings"      

       
               Case "rgMain"
                    bolAnswer = True
               Case Else

          End Select
     End Sub
    
     I'm using a Property and var to access a method in the child class form

  
          Dim m_RibbonTabSelected As String
    
          '.......................................
          Public Property RibbonTabSelected() As String
               Get
                    Return m_RibbonTabSelected
               End Get
               Set(ByVal value As String)
                    m_RibbonTabSelected = value
                    SetActiveTab(m_RibbonTabSelected)
               End Set
     End Property
    
     (this routine sets  the selected Tab)

     Public Sub SetActiveTab(ByVal sTabKey As String)
      Dim tabs As UltraTabsCollection = Me.UltraTabControl1.Tabs
     
         Me.UltraTabControl1.BeginUpdate()
                     Select Case sTabKey
                          Case "Standard"
                              
     
                               Me.UltraTabControl1.SelectedTab = tabs("Standard")
               
                          Case "Enhanced"
     
               
                               Me.UltraTabControl1.SelectedTab = tabs("Enhanced")
                          
                          Case "Ardis Settings"
                         
     
                     End Select
               Me.UltraTabControl1.EndUpdate()
     End Sub
    
    
     My problem is the Tab on the UltraTabControl is never set once the form loads
     I've tried the same rountine in the Load event of the Child form and it works fine.
     I've also added buttons in Ribbon Group to set each Tab on the UltraTabControl and that works correctly.
    
    
     What else do we need to do to get your control to work properly through the UltraToolbarsManager Ribbon Tab control??

Thanks,

PR