All pastes #424290 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-04-04 18:04 UTC
rendered paste body
private static int GetSelectedIndex(TreeView tv) {
            TreePath[] rows = tv.Selection.GetSelectedRows();
            if (rows.Length == 0)
                return -1;
            
            return rows[0].Indices[0];            
}