diff options
author | Rogelio Mita <rogeliomita@activitycentral.com> | 2013-06-19 22:58:42 (GMT) |
---|---|---|
committer | Rogelio Mita <rogeliomita@activitycentral.com> | 2013-06-19 22:58:42 (GMT) |
commit | cd706983e648e9b9d32b3f512cd66cb969eed062 (patch) | |
tree | a96e3943a2c79a676eee44b8da50afa30a756b98 | |
parent | 8b4749553362855b417e337bbf8b03bcf8e0101f (diff) |
Scroll to top when navigate trough group of questions
-rw-r--r-- | CeibalEncuesta/gtk2/CeibalEncuesta/Widgets.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/CeibalEncuesta/gtk2/CeibalEncuesta/Widgets.py b/CeibalEncuesta/gtk2/CeibalEncuesta/Widgets.py index e4cba39..83d9a34 100644 --- a/CeibalEncuesta/gtk2/CeibalEncuesta/Widgets.py +++ b/CeibalEncuesta/gtk2/CeibalEncuesta/Widgets.py @@ -96,9 +96,9 @@ class Panel(gtk.Paned): self.pack1(box, resize = False, shrink = True) # Derecha - window = gtk.ScrolledWindow(vadjustment=gtk.Adjustment()) - window.set_policy(gtk.POLICY_NEVER, gtk.POLICY_AUTOMATIC) - window.set_shadow_type(gtk.SHADOW_NONE) + self._window = gtk.ScrolledWindow(vadjustment=gtk.Adjustment()) + self._window.set_policy(gtk.POLICY_NEVER, gtk.POLICY_AUTOMATIC) + self._window.set_shadow_type(gtk.SHADOW_NONE) # Make scrolleable main box questions container, one group container = gtk.VBox() @@ -116,9 +116,9 @@ class Panel(gtk.Paned): container.pack_start(self.box_encuesta, True, True) self.toolbar_encuesta = ToolbarEncuesta() container.pack_end(self.toolbar_encuesta, False, False, 30) - window.add_with_viewport(container) + self._window.add_with_viewport(container) - self.pack2(window, resize = True, shrink = False) + self.pack2(self._window, resize = True, shrink = False) self.show_all() @@ -191,6 +191,8 @@ class Panel(gtk.Paned): a otro segĂșn valor de accion. """ + self._window.get_vadjustment().set_value(0) + index_visible = 0 grupos = self.box_encuesta.get_children() |