本文整理汇总了C#中System.Windows.Forms.TreeView.SuspendLayout方法的典型用法代码示例。如果您正苦于以下问题:C# TreeView.SuspendLayout方法的具体用法?C# TreeView.SuspendLayout怎么用?C# TreeView.SuspendLayout使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Forms.TreeView
的用法示例。
在下文中一共展示了TreeView.SuspendLayout方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Populate
public static void Populate(TreeView treeview, ParseTree parsetree)
{
treeview.Visible = false;
treeview.SuspendLayout();
treeview.Nodes.Clear();
treeview.Tag = parsetree;
ParseNode start = parsetree.Nodes[0];
TreeNode node = new TreeNode(start.Text);
node.Tag = start;
node.ForeColor = Color.SteelBlue;
treeview.Nodes.Add(node);
PopulateNode(node, start);
treeview.ExpandAll();
treeview.ResumeLayout();
treeview.Visible = true;
}
示例2: ActivateTab
private void ActivateTab(int index)
{
this.fileIndex = index;
if (index == -1)
{
return;
}
TabPage tp = this.tabControlFile.TabPages[index];
this.tabControlFile.SelectTab(index);
TreeView tv = new TreeView();
tv.SuspendLayout();
tp.Controls.Add(tv);
tv.Dock = DockStyle.Fill;
AddSwfToTreeView(swfs[fileIndex], tv);
tv.AfterSelect += new TreeViewEventHandler(tv_AfterSelect);
tv.ResumeLayout();
RefreshContentPane();
}
示例3: LoadListInternal
protected override void LoadListInternal(Mediator mediator, SplitterPanel parent)
{
parent.FindForm().UseWaitCursor = true;
parent.SuspendLayout();
RemovePreviousControl();
TreeView tv = new TreeView();
tv.SuspendLayout();
tv.Dock = DockStyle.Fill;
AddPossibilities(tv.Nodes, m_possibilityList.PossibilitiesOS);
tv.AfterSelect += new TreeViewEventHandler(tv_AfterSelect);
m_currentControl = tv;
tv.HideSelection = false;
parent.Controls.Add(tv);
tv.BringToFront();
tv.ResumeLayout();
parent.ResumeLayout();
parent.FindForm().UseWaitCursor = false;
base.LoadListInternal(mediator, parent);
tv.SelectedNode = tv.Nodes[0];
}
示例4: ClearTreeview
internal static void ClearTreeview(TreeView tv)
{
try
{
tv.SuspendLayout();
for (var i = 0; i < tv.Nodes.Count; i++)
{
var subs = tv.Nodes[i].Nodes;
for (var j = 0; j < subs.Count; j++)
{
subs[j].Text = string.Empty;
}
}
tv.CollapseAll();
}
catch (Exception e)
{
LogHelper.Dump(e);
}
finally
{
tv.ResumeLayout();
}
}