本文整理汇总了C#中System.Windows.Forms.TabPage.ScrollControlIntoView方法的典型用法代码示例。如果您正苦于以下问题:C# TabPage.ScrollControlIntoView方法的具体用法?C# TabPage.ScrollControlIntoView怎么用?C# TabPage.ScrollControlIntoView使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Forms.TabPage
的用法示例。
在下文中一共展示了TabPage.ScrollControlIntoView方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetControl
public Control GetControl()
{
tab = new TabControl { Dock = DockStyle.Fill };
Control bookmarkedRow = null; // the row we want to start at
foreach (var ecl in _file.eclDumps)
{
var page = new TabPage(ecl._blockName);
page.AutoScroll = true;
foreach (var eclAddr in ecl.decodedEcl.Keys.Reverse())
{
var eclText = ViewerHelper.CreateTextBox();
eclText.Text = ecl.decodedEcl[eclAddr];
eclText.Dock = DockStyle.Fill;
var eclAnnotation = ViewerHelper.CreateTextBox();
if (ecl.annotations.ContainsKey(eclAddr))
{
eclAnnotation.Text = ecl.annotations[eclAddr];
eclText.BackColor = System.Drawing.Color.LightBlue;
eclAnnotation.BackColor = System.Drawing.Color.LightBlue;
}
eclAnnotation.Width = 300;
eclAnnotation.Dock = DockStyle.Right;
//eclText.Dock = DockStyle.Top;
var row = ViewerHelper.CreateRow();
page.Controls.Add(row);
row.Controls.Add(eclText);
row.Controls.Add(eclAnnotation);
if (ChangeFileEventArgs.targetPlace != "" && eclAnnotation.Text.Contains(ChangeFileEventArgs.targetPlace) && page.Text == ChangeFileEventArgs.currentDaxId.ToString())
bookmarkedRow = row;
}
tab.TabPages.Add(page);
if (page.Text == ChangeFileEventArgs.currentDaxId.ToString())
{
tab.SelectedTab = page;
page.ScrollControlIntoView(bookmarkedRow);
}
}
var stringPage = new TabPage("ECL Text");
stringPage.AutoScroll = true;
var control = ViewerHelper.CreateTextBoxMultiline();
control.Text = _file.ToString();
stringPage.Controls.Add(control);
tab.TabPages.Add(stringPage);
return tab;
}