3
GTK #에서 트리 뷰의 선택한 항목을 가져 오는 방법을 이해할 수 없습니다. 내 코드 예제 : 여기에, 내가 선택한 행을 얻을 수있는 방법, 이을 OnTvstockRowActivated 내에서 Gtk # 및 treeview : "선택한"항목을 얻는 방법?
Gtk.TreeViewColumn marketCol = new Gtk.TreeViewColumn();
marketCol.Title = "Market";
tvstock.AppendColumn(marketCol);
Gtk.TreeIter iter = stockListStore.AppendValues ("Dax30");
stockListStore.AppendValues(iter, "Adidas");
stockListStore.AppendValues(iter, "Commerzbank");
iter = stockListStore.AppendValues ("Cac40");
stockListStore.AppendValues(iter, "Bnp Paribas");
stockListStore.AppendValues(iter, "Veolia");
iter = stockListStore.AppendValues ("FtseMib");
stockListStore.AppendValues(iter, "Fiat");
stockListStore.AppendValues(iter, "Unicredit");
tvstock.Model = stockListStore;
// Create the text cell that will display the artist name
Gtk.CellRendererText marketNameCell = new Gtk.CellRendererText();
// Add the cell to the column
marketCol.PackStart (marketNameCell, true);
// Tell the Cell Renderers which items in the model to display
marketCol.AddAttribute (marketNameCell, "text", 0);
tvStock
에 데이터를로드? 감사합니다.