none
How select item in ListBox control for HAT RRS feed

  • Question

  • I use  Hosted Application Toolkit for manage WinForms external application. I can access and set/read values of all types controls except ListBox. But can read value of selected item in ListBox, if use <AccSelector> tag in initialization string for this control. If ListBox control defined by <AccControl> in initialization string, then it cannot read value - it say a Label text near ListBox.

    I use CCF 2008.

     

    How can I select item in ListBox control on external application form?

     

    This is my initialization string for external application:


    <?xml version="1.0" encoding="utf-16"?>
    <initstring>
    <interopAssembly>
    <URL>C:\ExternalApp\ExternalApp.exe</URL>
    <WorkingDirectory>C:\ExternalApp</WorkingDirectory>
    <hostInside />
    </interopAssembly>
    <adapter>
    <AutomationAdapter />
    </adapter>
    <DataDrivenAdapterBindings>
    <Type>Microsoft.Ccf.HostedApplicationToolkit.DataDrivenAdapter.WinDataDrivenAdapter, Microsoft.Ccf.HostedApplicationToolkit.DataDrivenAdapter</Type>
    <Controls>

    <AccSelector name="Month_Listbox_AccSelector">
    <Path>
    <FindWindow>
    <Class>WindowsForms10.LISTBOX.app.0.378734a</Class>
    </FindWindow>
    </Path>
    </AccSelector>

    <AccControl name="Month_Listbox_AccControl">
    <Path>
    <FindWindow>
    <Class>WindowsForms10.LISTBOX.app.0.378734a</Class>
    </FindWindow>
    </Path>
    </AccControl>

    <AccControl name="Time_TextBox">
    <Path>
    <FindWindow>
    <Find match="2">
    <Caption />
    <Class>WindowsForms10.EDIT.app.0.378734a</Class>
    </Find>
    </FindWindow>
    </Path>
    </AccControl>

    <AccControl name="Ok_Button">
    <Path>
    <FindWindow>
    <Find>
    <Caption>Ok</Caption>
    </Find>
    </FindWindow>
    </Path>
    </AccControl>

    </Controls>
    </DataDrivenAdapterBindings>
    <displayGroup>MainPanel</displayGroup>
    <optimumSize x="800" y="600" />
    <minimumSize x="640" y="480" />
    </initstring>

     

    Thursday, March 25, 2010 9:02 AM