def create_search_button (self, text, line_index):
search_button = Gtk.Button()
self.search_buttons_array.append(search_button)
cell = Gtk.TextView()
cell.set_wrap_mode(True)
cellTextBuffer = cell.get_buffer()
cellTextBuffer.set_text(text)
cell.set_right_margin(20)
cell.set_wrap_mode(2)#2 == Gtk.WRAP_WORD
cell.show()
search_button.add(cell)
search_button.show()
search_button.connect("clicked", self._search_button_action, line_index)
button_y_coordinate = len(self.search_buttons_array) -1
self.search_buttons_table.attach(search_button, 0, 0+1, button_y_coordinate, button_y_coordinate+1)
评论列表
文章目录