Hi,
I've been playing around with scrollbars and can't get horizontal scrolling to
work. I tried playing with line and word wrapping but it doesn't seem to
work.
Here's my short test program:
#!/usr/bin/env python
import gtk
class GUI:
""" Form the GUI and bootstrap the application """
def __init__(self):
self.root = gtk.GtkWindow(type=gtk.WINDOW_TOPLEVEL,
title="Scrollbar
test")
self.root.set_usize(200, 200)
self.root.connect("destroy", gtk.mainquit)
# Table for the main app
self.tbl = gtk.GtkTable(2, 2, gtk.FALSE)
self.root.add(self.tbl)
# Main text widget
self.txt1 = gtk.GtkText()
self.tbl.attach(self.txt1, 0, 1, 0, 1,gtk.EXPAND | gtk.FILL,
gtk.EXPAND | gtk.FILL)
self.txt1.set_editable(gtk.TRUE)
self.scl = gtk.GtkHScrollbar(self.txt1.get_hadjustment())
self.tbl.attach(self.scl, 0, 1, 1, 2, gtk.FILL,
gtk.FILL )
self.vscl=gtk.GtkVScrollbar(self.txt1.get_vadjustment())
self.tbl.attach(self.vscl, 1, 2, 0, 1, gtk.FILL,
gtk.FILL )
# Show all the windows
self.root.show_all()
self.mainloop()
""" This is the Apps mainloop """
def mainloop(self):
gtk.mainloop()
if __name__ == '__main__':
myGUI = GUI()
Can anyone see what I'm doing wrong here?
Thanks,
Steve
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk