GtkCList gtk_clist_move_to
- From: g zandini ml org
- To: gtk-list redhat com
- Subject: GtkCList gtk_clist_move_to
- Date: Thu, 26 Nov 1998 11:40:16 -0800 (PST)
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]