本文整理匯總了C#中System.Windows.Forms.FlowLayoutPanel.ScrollControlIntoView方法的典型用法代碼示例。如果您正苦於以下問題:C# FlowLayoutPanel.ScrollControlIntoView方法的具體用法?C# FlowLayoutPanel.ScrollControlIntoView怎麽用?C# FlowLayoutPanel.ScrollControlIntoView使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.Windows.Forms.FlowLayoutPanel
的用法示例。
在下文中一共展示了FlowLayoutPanel.ScrollControlIntoView方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: AddLabelToLocation
/// <summary>
/// 將Note添加在麵板的指定位置
/// </summary>
/// <param name="flp"></param>
/// <param name="text"></param>
public static void AddLabelToLocation(FlowLayoutPanel flp, Model.PostContents.PostContent post)
{
int labelCount = flp.Controls.Count;
LabelExSolidBorder le = new LabelExSolidBorder();//此處可變更LabelEx樣式,可配置
int flag = 0;
int X = LOCATION_X;
int Y = CONTENT_MARGIN;
if (labelCount == 0)
{
le.BackColor = ColorTranslator.FromHtml(ColorManager.ColorConvertor(flag));
flag++;
}
for (int i = 0; i < labelCount; i++)
{
flag++;
Y += CONTENT_HEIGHT;
Y += CONTENT_MARGIN;
le.BackColor = ColorTranslator.FromHtml(ColorManager.ColorConvertor(flag));
if (flag > 19)
{
flag = 0;
}
}
le.Location = new Point(X, Y);
le.Text = post.Content;
le.Tag = post;
flp.Controls.Add(le);
flp.ScrollControlIntoView(le);
}