Ok, I found the solution (thanks to help from Tadej Borovšak on gtk-app-devel-list):
I had to call textview.set_size_request(0, 0), so now the textview doesn't request space for all its contents. Noam On Sun, Jul 4, 2010 at 3:45 PM, Noam Yorav-Raphael <noamr...@gmail.com> wrote: > Hello, > > I would like to implement my own ScrolledWindow that will hold a > TextView. The reason is that I would like to use the small square > between the horizontal scrollbar and the vertical scrollbar as a > resize grip. (The whole window will be a tooltip, so there would be no > other way to resize the window.) > > I managed to pack the TextView and two scrollbars into a table, and > connect the scrollbars to the TextView. However, the TextView would > always expand to include the entire text in it, so the scrollbars > remain disabled. > > How can I make it not expand? > > Thanks! > Noam > > PS. Here's my code: > > import gtk > tv = gtk.TextView() > hs = gtk.HScrollbar() > vs = gtk.VScrollbar() > tab = gtk.Table(2,2) > tab.attach(tv,0,1, 0,1) > tab.attach(vs,1,2,0,1) > tab.attach(hs,0,1,1,2) > tv.set_scroll_adjustments(hs.props.adjustment, vs.props.adjustment) > w = gtk.Window() > w.add(tab) > w.show_all() > _______________________________________________ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/