Unable to click/select tabs???

Nov 3, 2008 at 9:18 AM
I'm using build 0.17, and no matter what I do I cannot select a page in a tab control.

Debugging through the test, and inspecting the properties of the pages show the clickable point as throwing an exception, probably because the bounds are reported as 0,infinity.

I thought it might be due to the tab control being within a user control so I made a basic form with tabcontrol, but the same thing happens there.

I've included the code I'm using below, with the click method on a retrieved tab, and also a SelectTabPage on the index number. Both fail and the mouse clicks at point 0,0 on the screen.

Is this a known issue??

Cheers
Chris



Tab tabcontrol = controls.MainWindow.Get<Tab>("tabControl1");
TabPage tab0 = (TabPage)tabcontrol.Pages[0];
          
tab0.Click();

Thread.Sleep(2000);

tabcontrol.SelectTabPage(1);
Nov 3, 2008 at 9:45 AM
Okay, further investigation shows that it only fails when the tab control has the properties  RightToLeft set to Yes, and RightToLeftLayout set to True.

Of course these are the settings used by our application!
Nov 3, 2008 at 2:37 PM
You must use the TabPage.select() method instead of the click one.

José Tavares
Nov 3, 2008 at 2:51 PM
Thanks José but it does not seem to matter if I use click(), select() or SelectTabPage(..), none of them work if the tabs are set to the right. They all work if they are on the left.

Chris


Nov 5, 2008 at 11:43 PM
I use the following in my unit tests:

TabPage myTab = window.Get<TabPage>("TabText");
myTab.Click();

HTH
Nov 7, 2008 at 8:41 AM
and can i confirm that your tab control has RightToLeft set to Yes, and RightToLeftLayout set to True??  This is what seemed to cause the failure for me.


Cheers
Chris
Coordinator
Nov 9, 2008 at 12:38 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.