Forum Discussion

kandharkar_kapi's avatar
kandharkar_kapi
Occasional Contributor
12 years ago

Accessing Checkbox within a Mapped JTree object

Hi Team,

I have Swingobject which I have mapped to JTree in Object Mapping which is a basically a Tree with 'Checkbox' for each item. Through Object Mapping I am able to Click on Each Item by 'wItems' or 'ClickItem' but I am not able to access Checkbox or its state whether it is checked or not.

Please help me on this issue.

Object classname is customised Object looks something like below,



CheckboxTree is a Swing JTree with a checkbox in each of its nodes.




  • Hi Kapil,


     


    We need to know the class name of your control and whether it is inherited from the JTree control. 


     


    Perhaps, you will need to create some additional script function that will access checkboxes as TestComplete is unlikely to provide full support for the control.


    Can you post here a sample app containing your tree control so we can test it?


     

  • kandharkar_kapi's avatar
    kandharkar_kapi
    Occasional Contributor
    Hi Tanya,



    Thanks for your reply!

    JavaFullClassName of Tree Object is "org.jdesktop.swingx.JXTree"

    I dont know from which Class it is derived but I if you google this class name you would find it extends JTree as you would find it at below link( at line 174) http://grepcode.com/file/repo1.maven.org/maven2/org.swinglabs/swingx/1.6.1/org/jdesktop/swingx/JXTree.java



    S
    ample app I can not provide right now but will post it once I get it.

    I hope above information will solve my problem.
  • kandharkar_kapi's avatar
    kandharkar_kapi
    Occasional Contributor
    Hi Tanya,



    You mentioned "I need to create some additional script function that will access checkboxes" 



    Can you Please tell me how can I do it? (writting 
    additional script function )