Rupp, Lawrence E | 7 May 11:46 2012
Picon

Re: Problem with Text and Listbox Widgets

I have a Text widget that I am updating with 'set_text' and when the update occurs, the text is inserted but is
padded on the right to the column limit with question marks.  

Any idea what is causing this?  I don't know what information to provide that will help you narrow it down, so
let me know what you need.

I am using Python 2.4.

Thanks,

larry

Lawrence Rupp
P8 Trainer Software
(253) 657-9661
lawrence.e.rupp <at> boeing.com
Ian Ward | 7 May 14:41 2012

Re: Problem with Text and Listbox Widgets


On May 7, 2012 5:47 AM, "Rupp, Lawrence E" <lawrence.e.rupp <at> boeing.com> wrote:
>
> I have a Text widget that I am updating with 'set_text' and when the update occurs, the text is inserted but is padded on the right to the column limit with question marks.
>
> Any idea what is causing this?  I don't know what information to provide that will help you narrow it down, so let me know what you need.
>

A minimal example that reproduces the problem would be perfect :-)

IIRC the only thing in urwid that adds question marks is a filter on control characters being sent to the screen.  Is there a chance there are some control characters in the text you're passing?

> I am using Python 2.4.
>

Ian

_______________________________________________
Urwid mailing list
Urwid <at> lists.excess.org
http://lists.excess.org/mailman/listinfo/urwid
Eric Easley | 24 May 20:29 2012
Picon

GridFlow scrolling and focus

To Whom It May Concern:

If a GridFlow is larger than the screen, it can be scrolled through. However, if
GridFlow X loses focus, by switching focus to another widget in a pile or column
for example, GridFlow X shows only the first cells of the GridFlow rather than
those around the former focus cell. A minimal example can be found at
http://pastebin.com/6X0vNMAq . Run the script, scroll down so that Button 0 is
no longer showing and hit 'tab'. Focus will switch to the second GridFlow, but
the first GridFlow now show button 0 again as though it had never scrolled.

I would expect the GridFlow to retain its 'position' even without focus, like
ListBox does. Is this a strange expectation or is GridFlow's behavior strange?
To change this behavior, would GridFlow require calculate_visible() like
ListBox? Thank you.

Sincerely,
Eric Easley
Ian Ward | 24 May 23:39 2012

Re: GridFlow scrolling and focus

On Thu, May 24, 2012 at 2:29 PM, Eric Easley <eric101111 <at> gmail.com> wrote:
> To Whom It May Concern:
>
> If a GridFlow is larger than the screen, it can be scrolled through. However, if
> GridFlow X loses focus, by switching focus to another widget in a pile or column
> for example, GridFlow X shows only the first cells of the GridFlow rather than
> those around the former focus cell. A minimal example can be found at
> http://pastebin.com/6X0vNMAq . Run the script, scroll down so that Button 0 is
> no longer showing and hit 'tab'. Focus will switch to the second GridFlow, but
> the first GridFlow now show button 0 again as though it had never scrolled.
>
> I would expect the GridFlow to retain its 'position' even without focus, like
> ListBox does. Is this a strange expectation or is GridFlow's behavior strange?
> To change this behavior, would GridFlow require calculate_visible() like
> ListBox? Thank you.

Thanks Eric!

In this case it's actually the Filler that is choosing the position of
the GridFlow, so that would be the place to add logic about
remembering position.  GridFlow is a flow widget and doesn't know if
part of itself is obscured.

Filler will trim a large flow widget it contains and has to decide how
much to trim from the top and bottom.  When the GridFlow is rendering
a cursor then that cursor position overrides the Filler's preference
by ensuring the cursor is visible.  When not in focus (and not
displaying a cursor) the Filler will revert to its normal behaviour.

Maybe just putting your GridFlow as a single item in a ListBox will work?

Ian
Eric Easley | 26 May 16:51 2012
Picon

Re: GridFlow scrolling and focus

Putting it in a ListBox worked. Thanks so much.

Gmane