本文整理汇总了C#中Gtk.TreeView.CollapseAll方法的典型用法代码示例。如果您正苦于以下问题:C# TreeView.CollapseAll方法的具体用法?C# TreeView.CollapseAll怎么用?C# TreeView.CollapseAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gtk.TreeView
的用法示例。
在下文中一共展示了TreeView.CollapseAll方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DemoMain
public DemoMain ()
{
window = new Gtk.Window ("TestForm1");
Gtk.HBox hbox = new Gtk.HBox (false, 0);
hbox1 = new Gtk.HBox (false, 0);
Gtk.HBox hbox2 = new Gtk.HBox (false, 0);
Gtk.HBox hbox3 = new Gtk.HBox (false, 0);
hbox.Add (hbox1);
window.SetDefaultSize (600, 400);
window.DeleteEvent += new DeleteEventHandler (WindowDelete);
button1 = new Gtk.Button ("button1");
button1.Clicked += Button1Clicked;
button2 = new Gtk.Button ("button2");
button3 = new Gtk.Button ("button3");
Gtk.Button button4 = new Gtk.Button ("button4");
button4.Clicked += Button4Clicked;
Gtk.Button button5 = new Gtk.Button ("button5");
Gtk.Button button6 = new Gtk.Button ("button6");
Gtk.Button button7 = new Gtk.Button ("button7");
button7.Sensitive = false;
scaleButton1 = new Gtk.ScaleButton (0, 0, 100, 10, new string [0]);
hbox1.Add (hbox3);
hbox1.Add (hbox2);
hbox1.Add (button3);
hbox1.Add (button2);
button3.Accessible.Description = "help text 3";
button3.Sensitive = false;
label1 = new Gtk.Label ("label1");
textBox1 = new Gtk.Entry ();
Gtk.Entry textBox2 = new Gtk.Entry ();
textBox2.Visibility = false;
textBox2.Sensitive = false;
textBox2.IsEditable = false;
textBox3 = new Gtk.TextView ();
// TODO: scrollbars
Gtk.CheckButton checkbox1 = new Gtk.CheckButton ("checkbox1");
Gtk.CheckButton checkbox2 = new Gtk.CheckButton ("checkbox2");
checkbox2.Sensitive = false;
Gtk.TreeStore store = new Gtk.TreeStore (typeof (string), typeof (string));
Gtk.TreeIter [] iters = new Gtk.TreeIter [2];
iters [0] = store.AppendNode ();
store.SetValues (iters [0], "item 1", "item 1 (2)");
iters [1] = store.AppendNode (iters [0]);
store.SetValues (iters [1], "item 1a", "item 1a (2)");
iters [0] = store.AppendNode ();
store.SetValues (iters [0], "item 2", "item 2 (2)");
iters [1] = store.AppendNode (iters [0]);
store.SetValues (iters [1], "item 2a", "item 2a (2)");
iters [1] = store.AppendNode (iters [0]);
store.SetValues (iters [1], "item 2b", "item 2b (2)");
treeView1 = new Gtk.TreeView (store);
AddTreeViewColumn (treeView1, 0, "column 1");
treeView1.CollapseAll ();
treeView2 = new Gtk.TreeView (store);
AddTreeViewColumn (treeView2, 0, "column 1");
AddTreeViewColumn (treeView2, 1, "column 2");
treeView2.CollapseAll ();
treeView2.Accessible.Name = "treeView2";
tableStore = new Gtk.TreeStore (typeof (string), typeof (string), typeof (string), typeof (string));
iters [0] = tableStore.AppendNode ();
tableStore.SetValues (iters [0], "False", "Alice", "24", "");
iters [0] = tableStore.AppendNode ();
tableStore.SetValues (iters [0], "True", "Bob", "28", "");
dataGridView1 = new Gtk.TreeView (tableStore);
dataGridView1 = new Gtk.TreeView (tableStore);
dataGridView1 = new Gtk.TreeView (tableStore);
AddTreeViewColumn (dataGridView1, 0, "Gender");
AddTreeViewColumn (dataGridView1, 1, "Name");
AddTreeViewColumn (dataGridView1, 2, "Age");
dataGridView1.Accessible.Name = "dataGridView1";
hboxPanel = new Gtk.HBox ();
Gtk.Button btnRemoveTextBox = new Gtk.Button ("Remove");
btnRemoveTextBox.Clicked += RemoveTextBoxClicked;
Gtk.Button btnAddTextBox = new Gtk.Button ("Add");
btnAddTextBox.Clicked += AddTextBoxClicked;
txtCommand = new Gtk.Entry ();
txtCommand.Accessible.Name = "txtCommand";
Gtk.Button btnRun = new Gtk.Button ("Run");
btnRun.Clicked += btnRunClicked;
hboxPanel.Add (btnRemoveTextBox);
hboxPanel.Add (btnAddTextBox);
Gtk.TreeStore treeStore = new Gtk.TreeStore (typeof (string));
Gtk.TreeIter iter = treeStore.AppendNode ();
treeStore.SetValue (iter, 0, "Item 0");
iter = treeStore.AppendNode ();
treeStore.SetValue (iter, 0, "Item 1");
listView1 = new Gtk.TreeView (treeStore);
AddTreeViewColumn (listView1, 0, "items");
listView1.Accessible.Name = "listView1";
//.........这里部分代码省略.........