Forum Discussion

dan_qa's avatar
dan_qa
New Contributor
7 years ago

Can disabled buttons be accessed through a FindChild/similar method?

I have two disabled buttons that share the same parent (.Panel(0)). When I try to spy, there is no reference to the buttons themselves since they are disabled, and thus I cannot use FindChild. Is there a way to use FindChild to access the location of the buttons just to confirm that they are disabled?

1 Reply

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    Do the buttons actually appear on screen or are they not even on screen?  If they aren't visible on screen, do they show up at all in the object browser?

     

    If they are not on screen and are in the object browser, then yes, you can use FindChild to find the button objects and check properties to determine whether or not they are enabled or disabled.  If, however, they don't even exist in the object browser, then it's not a matter of them being disabled but that they don't even exist.  In this case, you would use FindChild to search for the object and check the result.  If the result of the FindChild is null, then the buttons don't exist and are effectively disabled.