Forum Discussion

nazar_didyk's avatar
nazar_didyk
New Contributor
13 years ago

Need to do right click on one of the groups of TdxNavBar

Hi, 



We have TdxNavBar with 4 groups (TdxNavBarGroup)

I need to emulate right click on one of those groups. 



Maybe someone had the same problem?

1 Reply

  • aqAnt's avatar
    aqAnt
    SmartBear Alumni (Retired)

    Hello Nazar,


    You can calculate a point to click and use the ClickR method of the TdxNavBar object like this:



    function Test()

    {

      var NavBar = Sys.Process("GroupControlDemo").VCLObject("fmGroupControlMain").VCLObject("nbMain");

      var BarGroup = NavBar.VCLObject("bgMyComputerControl"); 

      var X = BarGroup.Left + BarGroup.Width/2;

      var Y = BarGroup.Top + BarGroup.Height/2;

      NavBar.ClickR(X, Y);   

    }