The ptwidgets package contains a group of pure Tcl/Tk mega-widgets that attempt to implement some fairly modern user-interface elements that are missing from the stock version of Tk. The intent of the ptwidgets package is to complement other Tcl/Tk mega-widgets available in other packages such as BWidgets. The package is based on Tcl/Tk version 8.5 or higher.

The following widgets are currently supported:



toggleswitch


toggleswitch_on toggleswitch_off

The toggleswitch widget implements a simple on/off switch.




tokenentry


tokenentry

The tokenentry widget implements a widget that provides a text entry field that allows the user to create, edit, delete and change the order of tokens. Each tokenentry token contains textual string information but treats the entire string as a single entity and graphically displays the token within the text entry field. This widget can be useful for creating tags within a form or for entering e-mail addresses.



tokensearch


tokensearch_popup_example

The tokensearch widget implements a widget that provides a text entry field that allows the user to create, edit, delete and change the order of tokens. Each tokensearch token contains a category, a search string, and, optionally, other search options but treats the both as a single entity and graphically displays the token within the text entry field. This widget can be useful for creating both simple and advanced search widgets that take up very little screen real estate, without giving up powerful search capability in an easy to use interface.



wmarkentry


wmarkentry

The wmarkentry widget is a standard entry widget that has the ability to display watermark text in a configurable color. The watermark text is only displayed when no user text exists in the widget. The watermark text is not selectable or traversable.