[10471] in The GTK GIMP ToolKit mailing list archive

home help back first fref pref prev next nref lref last post

[gtk-list] GtkCList gtk_clist_move_to

daemon@ATHENA.MIT.EDU (g@zandini.ml.org)
Thu Nov 26 14:38:28 1998

From: g@zandini.ml.org
Date: Thu, 26 Nov 1998 11:40:16 -0800 (PST)
To: gtk-list@redhat.com
Resent-From: gtk-list@redhat.com
Reply-To: gtk-list@redhat.com

hi, 
I am rather new to this gtk stuff, so please correct me if
I am way off the track.

I was created a gtk_clist and then I tried to connect two buttons 
to scroll up and down the list. but some how gtk_clist_move doesn't
do anything. Or is gtk_clist_move used for something else?
here is the code I wrote.


void scroll_down ( GtkWidget * widget, gpointer data ) {
    gtk_clist_moveto ( GTK_CLIST(data), pos_row+= 10, pos_col, 0.0,0.0 );
}

void scroll_up ( GtkWidget * widget, gpointer data ) {
    gtk_clist_moveto ( GTK_CLIST(data), --pos_row, pos_col, 0.0, 0.0);
}

... and in another function 

    panel = gtk_clist_new( 2 );

    gtk_clist_set_column_title ( GTK_CLIST (panel), 0, "line");
    gtk_clist_set_column_title ( GTK_CLIST (panel), 1, filename);
    gtk_clist_column_titles_show ( GTK_CLIST (panel));

    button = new_button_with_pix ( table, "up.xpm", "UP" );
    gtk_signal_connect ( GTK_OBJECT(button), "clicked",
            GTK_SIGNAL_FUNC ( scroll_up ), (gpointer) panel );
    gtk_widget_show ( button);
    button = new_button_with_pix ( table, "down.xpm", "DOWN" );
    gtk_signal_connect ( GTK_OBJECT(button), "clicked",
            GTK_SIGNAL_FUNC ( scroll_down ), (gpointer) panel );
    gtk_widget_show ( button);



I'll appreciate any help, comments.
Thanx =)

Ji Lee



-- 
To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null


home help back first fref pref prev next nref lref last post