Hi seriously need help here with regard to FLTK coding.  My primary purpose is 
that i want my window to update itself by pressing some button after i change 
the value of the input in.txt file. However I am not able to achieve this. Can 
anyone advice me on this.

summary of my code is as below
//**********************************************************************

#include etc...
int etc.. some Global variable like data0, data1. //for storing value from 
in.txt


static void read(Fl_Widget*,void*)
{
//implementation of Fl_window and Fl_chart (declared earlier as global variable 
as well)

//when one button is press in main, it would callback the function read
//input from in.txt. A chart would be draw according to the value read.

win->show();
}


int main(int argc, char **argv)
{
//some buttons with call back function
}

//************************************************************************


After I change data in file in.txt, I would press the button which would again 
callback the read function. However the chart in the window wont update. The 
window will only update unless I use win->hide() follow by win->show(). But the 
downside is that each time i hide and show, the window will keep flashing which 
is not desirable. Is there any better ways I can update my window with the new 
chart, like using redraw() function?
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to