Re: Focus row in a GtkCTree



Does anyone know how to *set* the focus row in a GtkCTree? I've found out how to
retrieve it, and I've found out how to get and set the selection, but I can't
seem to find any way of programmatically changing the focus row. (I want the
same behaviour that you get when you manually click on a row.)

 
 goto_row(GtkWidget *clist, gint row)
 {
                gtk_clist_freeze(GTK_CLIST(clist));
                gtk_clist_unselect_all(GTK_CLIST(clist));
                gtk_clist_select_row(GTK_CLIST(clist, row, 0);
                GTK_CLIST(clist)->focus_row = row;
                gtk_clist_moveto(GTK_CLIST), ROW, 0, 0.5, 0.0);
                GTK_CLIST_THAW(gtk_clist(clist));
        }


        This is a function I used in one of my programs to set the focus row.

        Ken




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