Gtk.DrawingArea: Port to python3/gtk3



Hi,

How should I convert this gtk3?

            self.area = Gtk.DrawingArea()

        #Paints the piano roll (Where the notes are)
        def paint_widget(self):
                if self.area.window == None:
                        return

                colormap = self.area.get_colormap()

                if self.gc_background == None:
                        color_background = colormap.alloc_color('#FFFFFF', True, True)
                        self.gc_background = self.area.window.new_gc()
                        self.gc_background.set_foreground(color_background)



--
Patrick Shirkey
Boost Hardware Ltd



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