Forum Discussion

vthomeschoolmom's avatar
vthomeschoolmom
Super Contributor
13 years ago

another MSAA control issue/question

I have a control on a form that is reporting wClass XTPDockingPaneTabbedContainer. Hey! That looks a lot like my XTPDockBar and XTPToolBar controls.



When I record clicking on the tabs, it clicks on coordinates which are missed a lot in reply. (You all know by now my burning desire to avoid coordinates). So I added that class to my MSAA Open App properties as with XTPDockBar and XTPToolBar.



When I record the clicking of tabs, the recorder gives me:







  Set tabList = Sys.Process("myApp").VBObject("frmmMainForm").Window("MDIClient").VBObject("frmSecurity").TabList("XTPDockingPaneTabbedContainer").VBObject("pbGroup").TabList("XTPDockingPaneTabbedContainer")

  Call tabList.ClickTab("Connections")

  Call tabList.ClickTab("ODBC")

  Call tabList.ClickTab("Menu Items")

  Call tabList.ClickTab("SM Data Elements")



YAY! That is just what I want, to click the tabs by name. But when I rerun it back, I get an error.



Tab page 'Connections" not found. with remarks



  Set tabList = Sys.Process("Instrument Manager").VBObject("imMainForm").Window("MDIClient").VBObject("frmSecurityUsersandGroups").TabList("XTPDockingPaneTabbedContainer").VBObject("pbGroup").TabList("XTPDockingPaneTabbedContainer")

  Call tabList.ClickTab("Connections")

  Call tabList.ClickTab("ODBC")

  Call tabList.ClickTab("Menu Items")

  Call tabList.ClickTab("SM Data Elements")



I have not changed the state since recording.



If it is recognizable at record time, how do I get it to recognize at run time? Thanks!






2 Replies

  • When I use the Display Object Properties window, I can point directly to a tab. It reports



    ... a bunch of object references I am going to obfuscate....

    TabList("XTPDockingPaneTabbedContainer").VBObject("pbGroup").TabList("XTPDockingPaneTabbedContainer").PageTab("Menu Items")





    When I try to send a click the PageTab object run time, again Unable to find object PageTab("Menu Items")



    It can see stuff in the object browser that it cannot see at run time. How can this be?

    Thanks