Forum Discussion

pashooo's avatar
pashooo
Contributor
14 years ago

Cant "FindChild" however the child exist

I try to use FindChild method in such way: DockingManager.FindChild("NativeClrObject.Name", "DocumentPane", 3)

... but TC cant find it, and says that it doesnt exist(



But  the

"DockingManager.WPFObject("ResizingPanel", "", 1).WPFObject("ResizingPanel", "", 1).WPFObject("DocumentPane", "", 1)" object is exist.

I have used FindChild method and it works correctly, but not for this object(((

Why the "FindChild"  cant find  ...WPFObject("DocumentPane", "", 1)"  among children?





 


 





 

3 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    It's probably because of how you're doing the call.  Your property you're searching for isn't a single property, it's the property of a property and that may be getting lost.



    Try, instead, using a different set of properties to do the search.



    For that matter, since DocumentPane is the "Name" of the object, you might not need to use the NativeClrObject.Name propety at all but simply



    DockingManager.FindChild("Name", "DocumentPane", 3)
  • Thank you very much)



    I checked  properties in object spy to know object Name and use it to find odject and founded that NativeClrObject.Name == Instruments_SPBFUT_RIH2_032012_Desk, but not DocumentPane...


    This code works correctly:

    DockingManager.FindChild("NativeClrObject.Name", "Instruments_SPBFUT_RIH2_032012_Desk", 3)

  • Hi Pasha,



    Either that, or:

    DockingManager.FindChild("ClrClassName", "DocumentPane", 3)