:> Message: 3 :> Date: Fri, 19 Nov 2004 02:01:18 +0100 :> From: David Gil Oliva <[EMAIL PROTECTED]> :> Subject: [pygtk] GenericCellRenderer shows text vertically :> To: [EMAIL PROTECTED] :> Message-ID: <[EMAIL PROTECTED]> :> Content-Type: text/plain; charset=US-ASCII :> :> Hello! :> :> I have found the following code on the Internet. My problem :> is that when I run the program, MyGenericCellRenderer shows :> the text vertically, not horizontally. What is happening? :> :> Code from :> http://www.daa.com.au/pipermail/pygtk/2003-September/005829.html :> :> import pygtk :> pygtk.require('2.0') :> :> import gtk :> import gobject :> import pango :> :> class MyCellRenderer(gtk.GenericCellRenderer): :> def __init__(self): :> self.__gobject_init__() :> def on_render(self, window, widget, background_area, :> cell_area, expose_area, flags): :> context = widget.get_pango_context() :> layout = pango.Layout(context) :> layout.set_text(long_string) :> >>>>>> layout.set_wrap(gtk.WRAP_CHAR)
If you unset this line or change the wrap constant the behavior will change. For more see: http://www.moeraki.com/pygtkreference/pygtk2reference/pango-constants.html#p ango-wrap-mode-constants Mit freundlichem Gru� with best regards Maik Hertha -------------------------------------- maik [dot] hertha [at] berlin [dot] de _______________________________________________ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
