Hello,
With the packages from stable, the radio boxes created with
newtRadiobutton() do not work as expected. In the following example
code, the 2nd box can not be selected, the dialog instantly closes when
you try to select it with the space key.
Another problem is, when you got more boxes (e.g. 5 or 7) and select the
4th box the cursor instantly jumps down to the next option.
--- Code start
#include <newt.h>
#include <stdlib.h>
#include <stdio.h>
int main(void) {
newtComponent form, checkbox, rb[3], button;
newtInit();
newtCls();
newtOpenWindow(10, 5, 40, 11, "Example for bug");
rb[0] = newtRadiobutton(1, 3, "Choice 1", 1, NULL);
rb[1] = newtRadiobutton(1, 4, "Choice 2", 0, rb[0]);
rb[2] = newtRadiobutton(1, 5, "Choice 3", 0, rb[1]);
button = newtButton(1, 7, "Ok");
form = newtForm(NULL, NULL, 0);
int i=0;
for (i = 0; i < 3; i++)
newtFormAddComponent(form, rb[i]);
newtFormAddComponent(form, button);
newtRunForm(form);
newtFinished();
return 0;
}
--- Code end
The problem does not occur when you use the packages from squeeze /
testing (Version 0.52.11-1).
Greetings from Germany,
Simon Frankenberger