RE: [gtk-list] Re: Why doesn't it work ??




On 16-Mar-2000 B Mohrgan Pratten wrote:
> I attach the program again, with the changes to the callback from. 
> But
> the problem persists.  I noticed that I did not actually state the
> nature of my problem last time so:
>

You didn't take the second piece of advice, which was to create the
label before connecting the callback to the signal:

        window = gtk_window_new (GTK_WINDOW_TOP
        gtk_signal_connect (GTK_OBJECT (window), "delete_event",
                GTK_SIGNAL_FUNC (cb_exit), NULL);

        toggle = gtk_toggle_button_new ();
        gtk_container_add (GTK_CONTAINER (window), toggle);
        label = gtk_label_new ("UP");
        gtk_container_add (GTK_CONTAINER (toggle), label);
        gtk_signal_connect (GTK_OBJECT (toggle), "toggled",
                GTK_SIGNAL_FUNC (cb_toggle), label);
        gtk_widget_show (toggle);
        gtk_widget_show (label);
        gtk_widget_show (window);

-tony


---
E-Mail: trog@gtk.org
UNIX is hot.  It's more than hot.  It's steaming.  It's quicksilver
lightning with a laserbeam kicker.
		-- Michael Jay Tucker

Go Bezerk! http://www.gtk.org/~trog



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