Hello
The attachement is an applet I made.

I can use {get-the-applet}.document.document-graphic.graphical-children to access all controls in the applet except the controls in subapplet.

I tried many ways and have no idea to get Applet instance of the subapplet.
I guess the subapplet is in the different process from his parent process.
I found Curl's Inspector can get everything I want but I have no way to figure out how.

Kindly give me some clues about it.Thanks.

James

----------------------------------------------------------------------------------------------
Confidentiality Notice: The information contained in this e-mail and any accompanying attachment(s) is intended only for the use of the intended recipient and may be confidential and/or privileged of Neusoft Group Ltd., its subsidiaries and/or its affiliates. If any reader of this communication is not the intended recipient, unauthorized use, forwarding, printing, storing, disclosure or copying is strictly prohibited, and may be unlawful. If you have received this communication in error, please immediately notify the sender by return e-mail, and delete the original message and all copies from your system. Thank you. -----------------------------------------------------------------------------------------------

{curl 5.1 applet}

{import * from CURL.ENGINE.BROWSER}
{let bounds:GRect =
    {{get-the-applet}.document.top-level-graphic.layout.get-bounds}
}
{let ag:AppletGraphic = 
    {AppletGraphic
        width = bounds.width,
        height = bounds.height
    }
}

{let ad:AppletData = 
    {AppletData ag, {string-url |"
 {curl 5.1 applet} {link href= {url
 "http://www.google.com"}, Google}{CommandButton}"|}}
}

{CommandButton
    label = "change controls' properties through document",
    {on Action do
        {let box:Box = {get-the-applet}.document.document-graphic}

        {for child in box.graphical-children do
            {set child.color = "red"} 
        }
    }
}

{CommandButton
    label = "how to control the controls in subapplet?",
    {on Action do
        {let box:Box = {get-the-applet}.document.document-graphic}

        {for child in box.graphical-children do
            {set child.color = "red"} 
        }
    }
}

{value ag}

Reply via email to