Re: [gtk-list] Effecting more than 1 GTK object when a button is clicked



On Mon, Feb 07, 2000 at 01:37:01PM -0500, Matthew Cordes wrote:
> Am I correct in assuming that if  I want a button click to grab data from
> a number of GkEntry boxes, then display the output on a GtkText widget
> and have the Window created in a separate file from my callbacks (and
> main) I need to make the widgets global throughout the files via extern?

No.


> Or is it possible to pass a number of objects via a callback?

This is the better solution.  You can create a structure to hold all
the widgets that you are interested in, and then use this structure to
send callback data to the callback function on the button click.


> Or is there some sort of central table of all widgets I create that
> I can access by name?

Not that I know of.


> Can anyone offer some suggestions or point me in the right direction?

Avoid using global variables unless really necessary.  Isn't that one
of the first things they teach in introductory programming courses and
books?

regards,
--andy



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