Well, the problem is that i cant be sure in what container the BaseInput will be placed. I tried to call the keypress method of ListBox which is on top of the BaseInput using: some_list_box_object.keypress(size,"down") but it threw an error about sizing. It made something similar for Text widgets stored in ListBox:
> if button == 5: > if len(self.body)-1 > self.focus_position: > self.set_focus(self.focus_position+1, coming_from="above") > elif button == 4 : > if self.focus_position > 0: > self.set_focus(self.focus_position-1, coming_from="below") So it scrolls trough a list of Text lines perfectly but i cant do it with Edit's On Fri, Feb 15, 2013 at 6:12 PM, Ian Ward <[email protected]> wrote: > On Fri, Feb 15, 2013 at 11:08 AM, Angel Kolev <[email protected]> wrote: > > Sorry i meant urwid.Edit. I wrapped it as: > >> > >> class BaseInput(urwid.Edit): > >> super(BaseInput, self).__init__(..... > > > > > > So i want to initiate a keypress trough a mouse_event. Something like: > > self.__super.keypress(size,"down") > > I see. Well, it's the ListBox that does the scrolling, so that's the > thing you should be subclassing. > > Your approach should work fine. > > Ian > > _______________________________________________ > Urwid mailing list > [email protected] > http://lists.excess.org/mailman/listinfo/urwid >
_______________________________________________ Urwid mailing list [email protected] http://lists.excess.org/mailman/listinfo/urwid
