|
Hi, I'm new to GTK and new to this forum, so I'm sorry if I'm a bit slow on the uptake.
I'm a complete GTK beginner, and I'm currently learning basic layout. I've set myself a challenge involving a window with ten buttons - clicking each button changes the text on one of the other buttons. Naturally, this means I need to be able to refer to a button after I've run the gtk_widget_show function, but tutorials so far have generated multiple buttons by reassigning as single GtkWidget* pointer to a new button after gtk_widget_show-ing each one, so I lose the reference to the previous button each time I create a new one.
I've created a simple application which uses an array of GtkWidget* pointers as opposed to just one, but would this fill up more memory than necessary? Perhaps there is another way to get around this (for example, I notice that gtk_widget_show returns void, but if there is a function similar to g_signal_connect which returns a gulong ID for that button which I can use to retrieve it)?
|