tags:

views:

23

answers:

2
func1();
func2();
...

In func1 there is a button widget,and in func2 a textview widget.(Both calls gtk_box_pack_start to add widgets to the window, so the order can't be changed.)

I want to operate textview when I click on button widget.

But at the time I define the callback,textview is not available yet.

How can I work around this?

A: 

So why adding a function func3() in which you connect the signals ?

Lothar
A: 

First create your widgets, then pack them together, then connect your signals.

ptomato