Saturday, April 02, 2011

gnocl::entry -new options

Since the release of Gtk+ 2.16 the entry widget has had the possibility of displaying icons. I don't know why. Perhaps it was in order to introduce some of the minor enhancements available in the libsexy module into the core code itself. There are two types of icon: primary or secondary. The primary icon is displayed to the left of the entry field and the secondary to the right. I'm sure that it's a little more complex than this though! Just another example of 'mind-less' feature binding.

Here's the script and screenshot





#!/bin/sh
#\
exec tclsh "$0" "$@"
package require Gnocl

set ent [gnocl::entry \
     -primaryIcon "%#New"
     -secondaryIcon "%#Save"]

gnocl::window -child $ent

No comments: