TIP #238 Version 1.1: Fire Event when Widget Created

This is not necessarily the current version of this TIP.


TIP:238
Title:Fire Event when Widget Created
Version:$Revision: 1.1 $
Author:Gerald W. Lester <Gerald dot Lester at cox dot net>
State:Draft
Type:Project
Tcl-Version:8.5
Vote:Pending
Created:Tuesday, 25 January 2005
Keywords:Tk

Abstract

This TIP arranged for a new virtual event to be fired every time a widget is created. This allows class bindings to automatically discover new widget instances and act on their creation.

Rationale

This event would be particularly useful on class bindings to allow custom code to be run when a widget of a particular class is created.

Example

% bind Toplevel <<Create>> {
    puts stdout {New toplevel called {%W} was created!}
}
% toplevel .foo
New toplevel called {.foo} was created!

Proposed C API Changes

No changes would be requried, this change is for the Tcl layer API.

Reference Implementation

A reference implementation does not yet exist.

Copyright

This document has been placed in the public domain.


Powered by TclThis is not necessarily the current version of this TIP.

TIP AutoGenerator - written by Donal K. Fellows