Community
Showing results for 
Search instead for 
Do you mean 
Reply

Adding tab to layout makes the tab button stop working

Copper Super Contributor
Posts: 71
Country: Canada

Adding tab to layout makes the tab button stop working

Hello Everyone,

 

I use the following code to add a tab to the layout, and as soon as the tab is added I can no longer use the tab key on the keyboard to move between fields, I have no idea why this is happening, any ideas? By the way I run the code when the view is loaded.

 

    Private Sub AddTab()

        ' If MyTabPage is nothing then this is the first time her

        ' We do not want to add MyTabPage each time 

        ' the user navigates to the contact details view

        If MyTabPage Is Nothing Then

            ' First Time here

            MyTabPage = New TabPage

            MyTabPage.Text = "MyTabPage"

            Dim UserControl1 As UserControl1 = New UserControl1(Me.HostApplication)

            UserControl1.Dock = DockStyle.Fill

            MyTabPage.Controls.Add(UserControl1)

            HostApplication.UILayoutDesignerManager.AddTabToCurrentLayout(MyTabPage)

        End If

 

    EndSub

Employee
Posts: 1,163
Country: USA

Re: Adding tab to layout makes the tab button stop working

I've not seen this happen. Does it matter what type of controls you add to your tabpage? Or does changing the dockingstyle have any affect? It could be a tab ordering issue, but I'm not sure that TabPages use that property.

Matthew Wood
Act! SDK Support
Community Moderator
Copper Super Contributor
Posts: 71
Country: Canada

Re: Adding tab to layout makes the tab button stop working

It seems the control I am adding to the tabpage is causing the issue, cant understand why but when then control is removed it works fine. I guess this is not really an ACT! issue but something weird with my control, if I tab through my control it eventually tabs back onto the contact record and then works, not sure whats going on...

Nickel Contributor
Posts: 175
Country: USA

Re: Adding tab to layout makes the tab button stop working

Just a thought here. In the past whenever I've added controls to a controlcollection in code, I've never passed any parameters in the control's constructor and I've never has issues. Could you try just using "New UserControl1()" and not passing anything in?