Tcl8.6.7/Tk8.6.7 Documentation > [incr Tcl] Package Commands, version 4.1.0 > itclcomponent
Tcl/Tk Applications | Tcl Commands | Tk Commands | [incr Tcl] Package Commands | SQLite3 Package Commands | TDBC Package Commands | tdbc::mysql Package Commands | tdbc::odbc Package Commands | tdbc::postgres Package Commands | tdbc::sqlite3 Package Commands | Thread Package Commands | Tcl C API | Tk C API | [incr Tcl] Package C API | TDBC Package C API
Parts of this description are "borrowed" from Tcl extension [snit], as the functionality is mostly identical.
protected component comp ?-inherit?
private component comp ?-inherit?
Explicitly declares a component called comp, and automatically defines the component's instance variable.
If the -inherit option is specified then all unknown methods and options will be delegated to this component. The name -inherit implies that instances of this new type inherit, in a sense, the methods and options of the component. That is, -inherit yes is equivalent to:
component mycomp delegate option * to mycomp delegate method * to mycompcomponent, widget, widgetadaptor, extendedclass