本文整理匯總了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;
}