On Sat, 01 Jul 2000 00:49:43 -0700, "Scott F. Johnston" <[EMAIL PROTECTED]> 
wrote:
> Does anybody have a patch to allow a GtkCList's "append" method
> to be called with "NULL" which would add the row with no data?
> 
> The 0.6.6 *_wrap_gtk_clist_append requires a sequence object.
> Not passing an argument would be a good trigger for this.
> 
> Also, I can't find any /good/ tutorial information on GC's
> and styles. gtk.org information is fragmentary at best.
> I can't get a bg_pixmap to appear behind the cells of my clist.
> 
> TIA,
> 
> S
> 
> _______________________________________________
> pygtk mailing list   [EMAIL PROTECTED]
> http://www.daa.com.au/mailman/listinfo/pygtk
> 
> 

maybe something like this:

from gtk import *

class MyCList (GtkCList):
        def __init__ (self, cols=1, titles=None, _obj=None):
                self.number_of_columns = cols
                GtkCList.__init__ (self, cols, titles, _obj)

        def append (self, values=None):
                if values == None:
                        empty_values = []
                        for i in range(self.number_of_columns):
                                empty_values.append ("")
                        GtkCList.append (self, empty_values)
                else:
                        GtkCList.append (self, values)

# testing
win = GtkWindow ()
win.connect ("destroy", mainquit)

#clist = GtkCList (3, ("ColumnOne", "ColumnTwo", "ColumnThree"))
clist = MyCList (3, ("ColumnOne", "ColumnTwo", "ColumnThree"))
clist.append (("a", "b", "c"))
clist.append (("", "", ""))             # usual way
clist.append (("d", "e", "f"))
clist.append ()                                 # the way you like it :)
clist.append (("g", "h", "i"))

win.add (clist)
win.show_all ()
mainloop ()


_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk

Reply via email to