Forum Discussion

MDJ's avatar
MDJ
New Contributor
3 years ago

How to get a tabitem location?

I'm writing a script to rename a tabitem by right click the tabitem caption. But I can't get the tabitem location through testcomplete.

Although I can directly assign value to tab "Text", but this is not a user’s behavior. How can I get the tabitem location?

  • I found the solution. The "TabControl" element has method "GetTabRect". I can get the tab caption location through this method.

    • MDJ's avatar
      MDJ
      New Contributor

      Thanks Marsha_R.

      My problem is Test Complete can't find the tab item control, only shows tab pages. I want to get the tab item location.

       

      • MDJ's avatar
        MDJ
        New Contributor

        I found the solution. The "TabControl" element has method "GetTabRect". I can get the tab caption location through this method.