Widgets across windows



I come from Visual Basic, so please forgive my twisted view of gtk programming ;-)

I have a window wndMain with a button btnRand. When btnRand is pressed, it is supposed to generate a random string, place the random string in rndstr, and then place the value of rndstr in rndbox, a text box on form wndRand. When I use:
   GtkWidget *rndtxt, *wndRand;

   wndRand = create_wndRand();
   rndtxt = lookup_widget(GTK_WIDGET(button),  "rndbox");

and run it, I get the error "** WARNING **: Widget not found: rndbox" In my experience with Visual Basic, you have to specify that the widget (rndbox) is on a different form than the button (btnRand). If I do have to do this, what is the code to do so?

Gxis posxte
-Eric





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]