RE: Re: Share widgets between windows



Hello Manu,

OK, I don't want to share a widget, but I want to
access to the statusbar of my main window from my
modal >window.
Is it possible ? Without global variable ?
 
You can attach pointers to other widgets to any gtk
object by using the function

        void gtk_object_set_data(GtkObject object, gchar
*name,  gpointer data)

and get the pointer back by using the function

        gpointer gtk_object_get_data( GtkObject obj, gchar
*name);

So you can attach the reference to the status bar with
the modal window using this API and can retrieve it
when required in the code.

When we create templates with Glade it uses the same
technique to identify the widgets in the lookup_widget
function that it writes in the support.c file.

Hope this helps

Tushar

=====
----------------------------------------------------------------------------------
Full Name    :Tushar Vijay Joshi
Address       :42/3 Ujjwal Nagar, Wardha Road, Nagpur 440 025
Contant Nos:(0) 91-712-2235940 (R) 91-712-2260565 (M) 98222-20365
Email          : tusharvjoshi yahoo com
----------------------------------------------------------------------------------

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com



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