Re: referencing widgets



HaB balicious wrote:
> My question is this.  In the function I call via the OK buttons "clicked"
> event, is there a way to reference each of the entry widgets separately?
> IOW, since they were all created with the same declared var, 'entry', is
> there a way to tell which is which once I am in another func?  Or do I have
> to create them all separately, passing each one's variable out to the verify
> func?  Make them global?

Hiya, the usual way to do this is to make a struct with a member for
each of your widgets. g_new() one of your structs when you build the
dialog, set the members as you build the widgets, pass the address of
the struct to the callback, and free the struct on destroy.

HTH, John




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