[WJG] For the past ten years or so I've been a mixed Windows/[Linux] user. Jolted along by a presentation that I made at an OpenAdvantage [http://www.openadvantage.org] seminar earlier this year, I decided to put windows on the back-burner and spend my time running linux. Putting OS considerations aside I needed to think about re-working my custom apps running under Tcl/Tk on windows. Windows and MacOS discourage us from fiddling about with the appearance of things whereas Linux, well... Now, that I've settled into things and got [Gnome] looking the way I like it, I want my tcl apps to fall in line. Not an easy thing to do in Tk - under Linux as everything still looks like Motif. So the dilema is GTk or Tk? Well -Gtk. But what about Tcl? If we refer to the Gtk+ developer site [http://www.gtk.org/bindings.html] we do find bindings listed and, as seems par for everying else, Python is the preferred choice. But why should it be? [LV] Another consideration - check out [Tile], which, as [Ttk], comes with [Tk] starting in Tcl/Tk 8.5. Perhaps it would be worthwhile seeing how to improve the Ttk-Gtk cooperation? ---- #!/usr/bin/env python # example helloworld.py import pygtk pygtk.require('2.0') import gtk class HelloWorld: def hello(self, widget, data=None): print "Hello World" def delete_event(self, widget, event, data=None): print "delete event occurred" return False def destroy(self, widget, data=None): print "destroy signal occurred" gtk.main_quit() def __init__(self): self.window = gtk.Window(gtk.WINDOW_TOPLEVEL) self.window.connect("delete_event", self.delete_event) self.window.connect("destroy", self.destroy) self.window.set_border_width(10) self.button = gtk.Button("Hello World") self.button.connect("clicked", self.hello, None) self.button.connect_object("clicked", gtk.Widget.destroy, self.window) self.window.add(self.button) self.button.show() self.window.show() def main(self): gtk.main() if __name__ == "__main__": hello = HelloWorld() hello.main() ---- #!/bin/sh # the next line restarts using tclsh \ exec tclsh "$0" "$@" package require Gnocl gnocl::window -child [gnocl::button -text "Hello World" -onButtonPress exit] -onDelete exit ---- !!!!!! %|[Category GUI]|% !!!!!!