[Urwid] suggestion and guidelines
Pedro Jorge Caridade
caridade at qta.qui.uc.pt
Mon Aug 13 14:47:34 EDT 2007
Hello Ian
Thank's for your reply.
> Would you send the part of your code that is not working? If you use
> Filler(my_widget, 'middle', 10) then my_widget should be only 10 rows
> high and the rest of the space will be blank. If you want to use that
> extra space for something then the ListBox needs to behave like a flow
> widget, so you could use BoxAdapter(my_widget, 10) instead.
>
I solved this! It was a stupid error, I was trying to make a list of a
list!!!!
> The problem here is that ListBox objects are always selectable, since
> you might want to scroll through unselectable content. If you don't
> mind not being able to scroll that one ListBox you can make it
> unselectable by subclassing ListBox:
>
> class UnselectableListBox(urwid.ListBox):
> _selectable = False
>
It work perfectly [if you did not know ;)]
The third point I also understood. But now I really need some help. As
you can see from my attached code (sorry if it not clean, but I am
really new on this python stuff), I create a class CUPSconsole where I
created two empty (actually with one empty element) listboxes. I was
expecting (again sorry if i going to say something really stupid) that
when I call "update_readings()" function the listbox contents should be
updated. But nothing happens. What am I doing wrong? What have I missed?
Thanks for all the trouble Ian, and for such nice package.
Pedro
-------------- next part --------------
A non-text attachment was scrubbed...
Name: printer3.py
Type: text/x-python
Size: 3554 bytes
Desc: not available
Url : http://lists.excess.org/pipermail/urwid/attachments/20070813/a928ce9d/attachment.py
More information about the Urwid
mailing list