From 757f325ae9aeb48e6ec0c3531a324d565b9f95ae Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Thu, 10 Feb 2011 14:41:22 -0500 Subject: [PATCH] add column headers --- Window.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Window.py b/Window.py index b6215a4..bf65c06 100644 --- a/Window.py +++ b/Window.py @@ -20,13 +20,21 @@ class Window: self.menubar.append(mi) # Projects Table - project_table = gtk.Table(rows = 1, columns = 9) + project_table = gtk.Table(rows = 2, columns = 9) new_project_combobox = gtk.combo_box_entry_new_text() new_project_combobox.append_text("Project1") new_project_combobox.append_text("Project2") - project_table.attach(new_project_combobox, 0, 1, 0, 1) + col_headers = ('Project', + 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun', 'Tot') + for i in range(len(col_headers)): + l = gtk.Label() + l.set_markup('%s' % col_headers[i]) + l.set_size_request(35 if i > 0 else 200, -1) + project_table.attach(l, i, i + 1, 0, 1) + + project_table.attach(new_project_combobox, 0, 1, 1, 2) # Bottom Control Bar self.mark_label = gtk.Label() @@ -43,6 +51,7 @@ class Window: vbox = gtk.VBox() vbox.pack_start(self.menubar) vbox.pack_start(project_table) + vbox.pack_start(gtk.HSeparator()) vbox.pack_start(hbox) self.window.add(vbox)