To derive a new method from an existing method, you can use the derived keyword followed by the scope resolution operator (::).
new method : existing method
The following example defines a GetCaption method for WPFNewTextBox that prints the string Caption as is before calling the built-in GetCaption method (defined in the AnyWin class) and printing its return value:
winclass WPFNewTextBox : WPFTextBox
GetCaption ()
Print ("Caption as is: ")
Print (derived::GetCaption ())