本文整理汇总了C#中ListBox.SetSize方法的典型用法代码示例。如果您正苦于以下问题:C# ListBox.SetSize方法的具体用法?C# ListBox.SetSize怎么用?C# ListBox.SetSize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ListBox
的用法示例。
在下文中一共展示了ListBox.SetSize方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Initialize
public static void Initialize()
{
#region menu setup
menuLabel = new Text(P._Canvas);
menuLabel.SetPos(128, 28);
menuLabel.Font = P.GuiFontLarge;
menuLabel.String = "Books";
menu = new ListBox(P._Canvas);
foreach (Book b in activeBooks)
{
activeBookItems.Add(menu.AddItem(b.title));
}
menu.EnableScroll(true, true);
menu.SetSize(160, 2*P.ScreenSize.Y/3 - 36);
menu.SetPos(128,48);
menu.MouseInputEnabled = true;
for (int i = 0; i < activeBookItems.Count; i++)
{
activeBookItems[i].OnRowSelected += new Base.ControlCallback(Book_OnRowSelected);
activeBookItems[i].SetTextColor(System.Drawing.Color.Gray);
}
#endregion
bookTitle = new Text(P._Canvas);
bookTitle.String = "";
bookTitle.SetPos(300, 40);
bookTitle.Font = P.GuiFontLarge;
authorText = new Text(P._Canvas);
authorText.String = "";
authorText.SetPos(300, 64);
statusText = new Text(P._Canvas);
statusText.SetPos(300, 80);
statusText.String = "";
publishingProgress = new ProgressBar(P._Canvas);
publishingProgress.Value = 0;
publishingProgress.SetBounds(300, P.ScreenSize.Y/3-16, 200, 16);
publishingProgress.Hide();
GameManager.BookPageItems.Add(menuLabel);
GameManager.BookPageItems.Add(menu);
GameManager.BookPageItems.Add(bookTitle);
GameManager.BookPageItems.Add(authorText);
GameManager.BookPageItems.Add(publishingProgress);
GameManager.BookPageItems.Add(statusText);
}