[Urwid] Problem with Text and Listbox Widgets

Rupp, Lawrence E lawrence.e.rupp at boeing.com
Thu Apr 12 18:50:41 EDT 2012


 Ian,

It was a newline problem, just like you thought.  I searched the internet on how to strip off a newline, found the 'rstrip()' function, applied it in my code, and VOILA!  No more line appending on my GUI.

Moochas Grass for pointing out the obvious!  May all your problems today be of a similar nature!

Larry


-----Original Message-----
From: urwid-bounces at lists.excess.org [mailto:urwid-bounces at lists.excess.org] On Behalf Of Ian Ward
Sent: Thursday, April 12, 2012 3:36 PM
To: Urwid General Discussion
Subject: Re: [Urwid] Problem with Text and Listbox Widgets

On Thu, Apr 12, 2012 at 5:52 PM, Rupp, Lawrence E <lawrence.e.rupp at boeing.com> wrote:
> The problem I'm having is that when I update one of the Text widgets with 'varname.set_text("example"), the text string "example" appears in the appropriate Text widget, but it also appears to add a carriage return, meaning the entire display below the updated Text widget shifts down one line.  How do I prevent this from happening?  How can I simply overwrite what was in the Text widget in the first place without a new line showing up?

That shouldn't happen.  Can you post some code that demonstrates the problem you're having?  Are you sure the text you're inserting doesn't have a trailing newline?

_______________________________________________
Urwid mailing list
Urwid at lists.excess.org
http://lists.excess.org/mailman/listinfo/urwid



More information about the Urwid mailing list