本文整理汇总了C#中Gtk.SelectPath方法的典型用法代码示例。如果您正苦于以下问题:C# Gtk.SelectPath方法的具体用法?C# Gtk.SelectPath怎么用?C# Gtk.SelectPath使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gtk
的用法示例。
在下文中一共展示了Gtk.SelectPath方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: get_BrowserItem_Value_ByPos
private string get_BrowserItem_Value_ByPos( Gtk.IconView browser )
{
int pointX = 0, pointY = 0;
ListStore store = null;
TreeIter iter;
TreePath path = null;
string server = null;
store = (ListStore)browser.Model;
if (store == null)
return null;
browser.GetPointer (out pointX, out pointY);
path = browser.GetPathAtPos (pointX, pointY);
browser.SelectPath (path);
curTreePathItem.path = path;
curTreePathItem.model = store;
store.GetIter (out iter, path);
server = (string)store.GetValue (iter, 0);
curTreePathItem.value = server;
return server;
}
示例2: get_BrowserItem_Value
private string get_BrowserItem_Value( Gtk.IconView browser )
{
ListStore model = null;
TreePath[] curTreePath = null;
TreeIter iter;
curTreePath = browser.SelectedItems;
if (curTreePath == null)
return null;
model = (ListStore)browser.Model;
model.GetIter (out iter, curTreePath[0]);
browser.SelectPath (curTreePath[0]);
curTreePathItem.value = model.GetValue (iter, 0).ToString();
curTreePathItem.model = model;
curTreePathItem.path = curTreePath[0];
return curTreePathItem.value;
}