none
Changing properties of rendered controls using DDAs. RRS feed

  • Question

  •  

    Hi,

    Can you change the property of a rendered control using Data Driven Adapters? My requirement is that based on some action I want to disable a textbox control of an application.

    Wednesday, January 9, 2008 1:10 PM

All replies

  • Depends on the application type..
    You should be able to get a handle to the automaton adapter for the object and update the properties on it.

     

    - Matt B.

    Wednesday, January 9, 2008 8:31 PM
    Moderator
  •  

    Can you kindly clarify what do you mean by "Depends on the application type"?

    Can you kindly also elaborate on the point, "You should be able to get a handle to the automaton adapter for the object and update the properties on it".

    Looking for your help. Thank You. 

    Thursday, January 10, 2008 4:58 AM
  • For an External Application you can use the win32 API to enable/disable the control.

     

    Code Block
    [DllImport("user32.dll", SetLastError = true)]
    internal static extern bool EnableWindow(IntPtr hWnd, bool bEnable);

     

     


    You must handle this in a custom DDA or a legacy adapter.

     

    Thursday, January 17, 2008 3:03 PM
  • If you are using the win32 DDA, you should be able to access the process using this.Process ( I think, not looking at it right now ). From there, you can use the Microsoft.Ccf.Csr.Win32Api functions to manipulate it.

     

    Matt B.

    Thursday, January 17, 2008 3:22 PM
    Moderator