Mike Miller wrote on 2011-03-14 04:39:
> Hi,
>
> I've been working on a pgadmin work-a-like this week. Despite having no
> clue what I'm doing, I've made good progress so far. The app can now
> query dbs/tables and show them in what looks like a table.
>
> I've got each field in an Edit widget, each row inside a Columns widget,
> and all rows wrapped up in a ListBox. Is there a better way? Works ok,
> but I wish it could scroll too. At some point I'll look into writing to
> the db.
scrolling should work, can you post a short example that demonstrates
the problem?
> It's been tough though, there doesn't seem to be much documentation
> between "hello worlds" and full-blown apps. But, I'm getting there
> slowly. Hope to upload to bitbucket soon, maybe next week.
>
> -Mike
>
> p.s. Anyone have a short (<10 line) bigtext example? I've been trying
> for a few hours and still no combination of widgets works. :/
Here's one:
bigtext = urwid.BigText("hello", urwid.HalfBlock7x7Font())
bg = urwid.SolidFill('x')
overlay = urwid.Overlay(bigtext, bg, 'center', None, 'middle', None)
urwid.MainLoop(overlay).run()
BigText is tricky to deal with because it is a "fixed widget" that can
only be displayed with an exact number of columns and rows. Overlay can
handle fixed widgets (as above) by turning it into a box widget. Padding
can handle them by turning them into flow widgets.
Look for the light-yellow in these diagrams:
http://excess.org/urwid/wiki/StandardWidgets
Ian
_______________________________________________
Urwid mailing list
[email protected]
http://lists.excess.org/mailman/listinfo/urwid