[Urwid] Columns set_focus problem

Sébastien Pierre sebastien at xprima.com
Tue Jul 18 13:49:27 EDT 2006


Hi !

The Columns.set_focus does not work as the Pile.set_focus does (pile
takes an int, columns takes a widget). This small modification make
Columns.set_focus take an int too:

	def set_focus(self, widget):
		"""Set the column in focus with a widget in self.widget_list."""
		if type(widget) != int:
			position = self.widget_list.index(widget)
		else:
			position = widget
		self.focus_col = position

 -- Sébastien




More information about the Urwid mailing list