Bug 83203 - Focus problems in program with scrollable textbox and scrollable listbox
Focus problems in program with scrollable textbox and scrollable listbox
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: newt (Show other bugs)
rawhide
i686 Linux
low Severity medium
: ---
: ---
Assigned To: Miroslav Lichvar
Jay Turner
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-01-31 03:10 EST by Martin Sjvgren
Modified: 2015-01-07 19:03 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-06-08 11:59:31 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Martin Sjvgren 2003-01-31 03:10:40 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.2.7 (X11; Linux i686; U;) Gecko/20021226
Debian/1.2.7-6

Description of problem:
The following program demonstrates the behaviour. I can't find a way to scroll
the listbox, only the textbox. I've tried this in mlterm, xterm and a
framebuffer console, same result.

#include <stdio.h>
#include <string.h>
#include <newt.h>

int
main()
{
    int i, width = 75, height = 22;
    newtComponent form, listbox, textbox, bOk;

    newtInit();
    newtCls();
    newtCenteredWindow(width, height, "Test");
    form = newtForm(NULL, NULL, 0);
    textbox = newtTextbox(1, 2, width-4, 10, NEWT_FLAG_WRAP | NEWT_FLAG_SCROLL);
    newtTextboxSetText(textbox, "abcd abcd abcd abcd abcd abcd abcd abcd abcd
abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd
abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd
abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd
abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd
abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd
abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd
abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd
abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd
abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd
abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd abcd
abcd abcd abcd abcd abcd abcd abcd abcd");
    listbox = newtListbox(1, 13, 6, NEWT_FLAG_RETURNEXIT);
    for (i = 0; i < 10; i++) {
        char text[256];
        sprintf(text, "Choice %d", i);
        newtListboxAppendEntry(listbox, text, (void *)i);
    }
    bOk = newtCompactButton((width-6)/2, height-2, "OK");
    newtFormAddComponents(form, listbox, textbox, bOk, NULL);
    newtRunForm(form);
    newtPopWindow();
    newtFinished();
    return 0;
}

Version-Release number of selected component (if applicable): 0.51.0

How reproducible: Always
Comment 1 Petr Rockai 2005-10-04 07:06:08 EDT
Confirmed, this is indeed a problem. Apparently, this combination of widgets 
is probably unusual enough to be not a problem for most programs. I will see 
if i can fix this... 
Comment 2 Miroslav Lichvar 2006-06-08 11:59:31 EDT
Fixed in newt-0.52.2-7.

Note You need to log in before you can comment on or make changes to this bug.