[Gtk-sharp-list] Getting selected row as integer in a TreeView?
Shaika-Dzari
shaikadzari at gmail.com
Mon Oct 23 22:33:25 EDT 2006
Hello.
You can find information about hte treeview here:
http://www.mono-project.com/GtkSharp_TreeView_Tutorial
Personnally, I use an iter to get the information from my ListStore like
this:
// Event on treeview
treeview1.Selection.Changed += OnSelectionEntry;
//*****************************************************************************
// event when user click in the treeview
//*****************************************************************************
protected void OnSelectionEntry(object o, EventArgs args)
{
TreeModel model;
if (((TreeSelection)o).GetSelected(out model, out iter))
{
CTraitement.TreeviewSelectID = (int)model.GetValue (iter, 0);
CTraitement.TreeviewSelect = (string)model.GetValue (iter, 1);
CTraitement.TreeviewSelectdvd = (string)model.GetValue
(iter, 3);
CTraitement.ImageSearch(imgCover);
}
}
You can check my code here for a complete example:
http://animeshell.googlecode.com/svn/trunk/animeshell-0.3/animeshell/MainWindow.cs*
*@+
Shaika-Dzari
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20061023/334fc2e0/attachment.html
More information about the Gtk-sharp-list
mailing list