How to determine / select tabs at runtime : Automation API

How to determine / select tabs at runtime

Class library usage, coding and language questions.

How to determine / select tabs at runtime

Postby sgreenfield » Mon Mar 16, 2009 2:41 am

I must be missing something - not sure how to determine at runtime just what tabs in a SysTabCtrl32 exist and how to select them either by name or index. Can you give an example?
sgreenfield
 
Posts: 17
Joined: Tue Oct 14, 2008 3:19 pm

Postby Support Team » Mon Mar 16, 2009 12:58 pm

The TabPageList and TabPage adapters provide the functionality you need:

Code: Select all
TabPageList tabPageList = ...;
// go through tabs and select each one
foreach (TabPage tab in tabPageList.Tabs)
{
    tab.Select();
    Delay.Seconds(1);
}
// select tab by index ...
tabPageList.Tabs[5].Select();
// ... or by title
tabPageList["tabPageTitle"].Select();


Regards,
Alex
Ranorex Support Team
User avatar
Support Team
Site Admin
 
Posts: 4845
Joined: Fri Jul 07, 2006 5:30 pm
Location: Graz, Austria

Postby sgreenfield » Mon Mar 16, 2009 1:31 pm

Alex:

As always, thanks for the quick and accurate reply.
sgreenfield
 
Posts: 17
Joined: Tue Oct 14, 2008 3:19 pm


Return to Automation API

Who is online

Users browsing this forum: No registered users and 0 guests