Non-Graphical Custom Controls

This functionality is supported only if you are using the Classic Agent.

Non-graphical custom controls are controls which are not owner drawn. If your application uses a non-graphical control that does not map to any of the controls that are supported by Silk Test Classic, you have the following options:

Example

In the following sample code, the class MyCustomTextField, which is a custom control in the application myApplication, is derived from the AnyWin class. The method TypeText is added to MyCustomTextField, and performs a Click and a TypeKeys.
const wDynamicMainWindow = MyApplication

window MainWin MyApplication
		locator "/MainWin[@caption=My Application']"

  // The working directory of the application when it is invoked
  const sDir = "%USERPROFILE%"

  // The command line used to invoke the application
  const sCmdLine = "C:\myApplication.exe"

  MyCustomTextField TextField
    tag "TextField"
    
winclass MyCustomTextField : AnyWin 
  void TypeText(string text)
    Click(1, 0)
    TypeKeys(text)
The test case Test1 calls the TypeText method.
testcase Test1 ()
	 recording
		  MyApplication.SetActive()
		  MyApplication.TextField.TypeText("test")