Re: [gtk-list] Simple(?) gtk_clist_moveto problem.
- From: "José Miguel R. Barrientos" <jmiguel ceselsa es>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Simple(?) gtk_clist_moveto problem.
- Date: Fri, 14 May 1999 13:05:21 +0000
Karol Bryd wrote:
>
> Czesc! (Hi!)
>
> I've just started my gtk programming and I have one simple
> question:
> how should I use gtk_clist_move()? I have read tutorial twice but
> I still don't know why it doesn't work. I have included a small c
> source
> that tries to display a window, with a clist in it, and a button.
> My intention is to change current clist entry when user clicks on
> the button. The current entry should be then centered in the clist
> and it's background color should be blue. Can somebody tell me
> what is wrong with this program? I'd be very grateful. Thanks.
>
> PS. sorry for my English - it's awfull - I know :-)
>
> Pozdrowienia (Regards)
> --
> Karol Bryd //
> http://www.kki.net.pl/~kbryd \ // Team *AMIGA*
> kbryd@femina.com.pl \X/ Powered by Linux
>
> The right to be let alone is indeed the beginning of all freedom.
> -- Justice Douglas
>
> --------------------------------------------------------------------------------
> Name: LIST.C
> LIST.C Type: Plain Text (text/plain)
> Encoding: quoted-printable
The ScrolledWindow Widget has changed in recent releases of Gtk.
In your program, try this:
gtk_container_add(GTK_CONTAINER(scrolled_window), gtklist);
REPLACING this
gtk_scrolled_window_add_with_viewport( GTK_SCROLLED_WINDOW(scrolled_window),
gtklist);
Ah!, you CANNOT create a list with 0 (zero) columns. Create it with
gtklist=gtk_clist_new(1);
I've compiled your source with these changes and (apparently) is working...
Regards,
- José Miguel
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]