Hi all,

I am trying to display the values from one browser to another browser. I am 
using FLTK 1.1.1 ver.

Here I am sample code:

<Included all header file>


#define PATH "/local_data"
#define MAX_R 5
char str1[500];
typedef struct
{
  int no;
  char name[80];
  char bdate[20]
} INFO;

INFO info[MAX_R];
info{1,"ABC","01Jan09",
     2,"CDE","02Jan09",
     3,"CDE","03Jan09",
     4,"CDE","04Jan09",
     5,"CDE","05Jan09"};

void testfunc(Fl_Widget *w, void *data)
{
   Fl_Browser *b = (Fl_Browser*)data;
   int Index=b->value();
   if(Index > 0 )
   {
      
sprintf(str1,"%s/%s_%d/%s,PATH,info[Index-1].name,info[Index-1].no,info[Index].date);
   }
}

main()
{

    Fl::visual(FL_RGB);
    Fl_Window *panel = new Fl_Double_Window(100,100,1160,910,"TEST WINDOW");
    panel->resizable(panel);

    Fl_Browser Brows_list1=new Fl_Browser(0,40,910,580,"");
    for(int i=0; i<MAX_R; i++)
    {
        sprintf(str1,"%s/%s_%d/%s,PATH,info[i].name,info[i].no,info[i].date);
        Brows_list1->add(str1);
    }

    Fl_Browser Brows_list2=New Fl_Browser(0,650,910,255,"");
    Brows_list1->callback(testfunc,(void*)Brows_list1);
}


How to display the Brows_list1 values into Brows_list2?

Thanks
Purna
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to