XForms: Bug in adding line to hidden browser

Mike Blackwell (mkb@cs.cmu.edu)
Wed, 21 May 1997 16:26:42 -0400

To subscribers of the xforms list from Mike Blackwell <mkb@cs.cmu.edu> :

In Xforms 0.86.1 (Irix 5.3), if you add lines to a hidden browser
that will necessitate scroll bars, the ghostly scroll bars will
appear on the form even though the associated browser is hidden.
I'm pretty sure this did not happen in earlier versions. I don't
have a good work-around for the program that this broke in.

Here's an example of the problem:

#include <stdio.h>
#include <stdlib.h>
#include <forms.h>

void main(int argc, char *argv[])
{
FL_FORM *ftest;
FL_OBJECT *browser;
FL_OBJECT *done;
int i;
char line[100];

fl_initialize(&argc, argv, "FTEST", 0, 0);

ftest = fl_bgn_form(FL_NO_BOX, 290, 250);
fl_add_box(FL_UP_BOX, 0, 0, 290, 250, "");
browser = fl_add_browser(FL_HOLD_BROWSER, 20, 20, 250, 130, "");
done = fl_add_button(FL_NORMAL_BUTTON, 90, 200, 100, 30, "Done");
fl_end_form();

fl_hide_object(browser);

for (i = 0; i < 10; i++) {
sprintf(line, "%d. This is a line in the browser", i);
fl_add_browser_line(browser, line);
}

fl_show_form(ftest, FL_PLACE_CENTER, FL_FULLBORDER, "Test");
while (fl_do_forms() != done) ;
}

Mike Blackwell
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html
Xforms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/