Reiner Wenke wrote:
> Yes, 'testtablerows' shows two tables, but you can't use it for
> interactive input to the cells, which I need for my program.
Hmm, I took singleinput and made two instances of the class
in the window, and it seemed to work fine on fedora3.
I did basically the same thing you described you did;
commented out the sliders and made two instances of the class.
Since I just made a copy of singleinput.cxx and changed main(),
I'm just posting just the main() bit here. It creates two tables,
and I can type into both:
int main()
{
Fl_Window win(600, 800);
win.size_range(1,1);
SingleInput* table1 = new SingleInput(20, 20, win.w()-40, 350);
SingleInput* table2 = new SingleInput(20, 400, win.w()-40, 350);
// ROWS
table1->row_header(1);
table1->row_header_width(70);
table1->row_resize(1);
table1->rows(11);
table1->row_height_all(25);
// COLS
table1->col_header(1);
table1->col_header_height(25);
table1->col_resize(1);
table1->cols(11);
table1->col_width_all(70);
// ROWS
table2->row_header(1);
table2->row_header_width(70);
table2->row_resize(1);
table2->rows(11);
table2->row_height_all(25);
// COLS
table2->col_header(1);
table2->col_header_height(25);
table2->col_resize(1);
table2->cols(11);
table2->col_width_all(70);
/***
// Add children to window
win.begin();
// ROW
Fl_Value_Slider setrows(win.w()-40,20,20,win.h()-80, 0);
setrows.type(FL_VERT_NICE_SLIDER);
setrows.bounds(2,MAX_ROWS);
setrows.step(1);
setrows.value(table->rows()-1);
setrows.callback(setrows_cb, (void*)table);
setrows.when(FL_WHEN_CHANGED);
setrows.clear_visible_focus();
// COL
Fl_Value_Slider setcols(20,win.h()-40,win.w()-80,20, 0);
setcols.type(FL_HOR_NICE_SLIDER);
setcols.bounds(2,MAX_COLS);
setcols.step(1);
setcols.value(table->cols()-1);
setcols.callback(setcols_cb, (void*)table);
setcols.when(FL_WHEN_CHANGED);
setcols.clear_visible_focus();
win.end();
****/
win.resizable(win);
win.show();
return Fl::run();
}
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk