GdkRectangle visibleRect = new GdkRectangle (); OS.gtk_tree_view_get_visible_rect (handle, visibleRect); OS.gtk_tree_view_scroll_to_point (handle, -1, visibleRect.y + cellRect.y);
int[] tx = new int[1], ty = new int[1]; OS.gtk_tree_view_widget_to_tree_coords(handle, cellRect.x, cellRect.y, tx, ty); OS.gtk_tree_view_scroll_to_point (handle, -1, ty[0]);
public void setTopIndex (int index) {	checkWidget();	if (!(0 <= index && index < OS.gtk_tree_model_iter_n_children (modelHandle, 0))) return;	int /*long*/ iter = OS.g_malloc (OS.GtkTreeIter_sizeof ());	OS.gtk_tree_model_iter_nth_child (modelHandle, iter, 0, index);	int /*long*/ path = OS.gtk_tree_model_get_path (modelHandle, iter);	OS.gtk_tree_view_scroll_to_cell (handle, path, 0, true, 0, 0);	if (OS.GTK_VERSION < OS.VERSION (2, 8, 0)) {		/*		* Bug in GTK.  According to the documentation, gtk_tree_view_scroll_to_cell		* should vertically scroll the cell to the top if use_align is true and row_align is 0.		* However, prior to version 2.8 it does not scroll at all.  The fix is to determine		* the new location and use gtk_tree_view_scroll_to_point.		* If the widget is a pinhead, calling gtk_tree_view_scroll_to_point		* will have no effect. Therefore, it is still neccessary to call 		* gtk_tree_view_scroll_to_cell.		*/		OS.gtk_widget_realize (handle);		GdkRectangle cellRect = new GdkRectangle ();		OS.gtk_tree_view_get_cell_area (handle, path, 0, cellRect);		GdkRectangle visibleRect = new GdkRectangle ();		OS.gtk_tree_view_get_visible_rect (handle, visibleRect);		OS.gtk_tree_view_scroll_to_point (handle, -1, visibleRect.y + cellRect.y);	}	OS.gtk_tree_path_free (path);	OS.g_free (iter);}