Can put a GtkLayout in a GtkListBox



Hello, in this code, adding a layout to a GtkListBox do not show layout content :(

What am i missing?

regards,

from gi.repository import Gtk

class mywindow(Gtk.Window):

   def __init__(self):
       Gtk.Window.__init__(self, title="Hello")
       box = Gtk.ListBox()
       label = Gtk.Label("Hello")
       label2 = Gtk.Label("Hello2")
       layout = Gtk.Layout()
       layout.put(label, 0, 0)
       box.add(layout)
       box.add(label2)
       self.add(box)

win = mywindow()
win.connect("delete-event", Gtk.main_quit)
win.show_all()
win.resize(300, 300)
Gtk.main()

--
Cédric Bellegarde


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]