You are here

Rounded Text Widget

Tcl/Tk is "known" for its ugliness to many developers but to them I can only say: you are living in the past. The tile theme engine is certainly not a one trick pony, but has a lot of functionality to offer that is not immediately obvious.

I think it was in the news group comp.lang.tcl where I read that it is possible to make a themed text widget on Macs and get the typical borders, even though the text widget does not belong to the tile widget set. The essential part is to use a ttk::frame widget but with a style from the entry widget, like
ttk::frame $w -style TEntry which is not a totally obvious solution. Inspired by this a managed to create a text widget with custom borders using an image element:
Rounded text widget
The complete test code can be found in the coccinella cvs at SourceForge: coccinella/contrib/tileutils.tcl. This also includes a short demonstration of my tkpath package for creating images directly by drawing commands.

Sorry for the very 10.2'ish Mac look.

Comments

Added an example that shows how to draw focus "ring" as well, optimized for Mac: http://wiki.tcl.tk/20109