[Glade-users] How can I change my widget setting?
- From: terry laynesoftware com (Terry Layne)
- Subject: [Glade-users] How can I change my widget setting?
- Date: Mon, 29 Dec 2003 09:56:45 -0800 (PST)
On Mon, 22 Dec 2003, Rtey Ehg wrote:
Hi all,I'm a new user of GTK+. I have a problem.I use GLADE to creat two
windows .The window_main contains 4 buttons(button1 to
button4).Window_pop contain one button(button5). I want to do is:when
start,button1 is sensitive,the other is unsensitive,Press button1,popup
the window_pop,press button5,it close window_pop,and set button2 to
button4 sensitive.But at callback.c,I can't use
gtk_widget_set_sensitive(button2) to set it.If I must declare every
widget on callback.c?(GLADE default genarator
main.c,interface.c,callback.c and support.c,and it declare every widget
in intreface.c).I say enough?Thanks!
Look at http://tinyurl.com/2gvuh (Graphical Interface Development with
Glade, by Rikke Giles) to see how to store a pointer to a widget in
another widget. If you store a pointer to window_pop in window_main then
you'll be able to access all widgets in window_pop from any widget in
window_main. In particular, you need the functions lookup_widget,
g_object_set_data, and g_object_get_data.
--
Terry Layne
Portland, OR
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]