本文整理汇总了C#中XCore.ChoiceGroup.OnDisplay方法的典型用法代码示例。如果您正苦于以下问题:C# ChoiceGroup.OnDisplay方法的具体用法?C# ChoiceGroup.OnDisplay怎么用?C# ChoiceGroup.OnDisplay使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类XCore.ChoiceGroup
的用法示例。
在下文中一共展示了ChoiceGroup.OnDisplay方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MakeListControl
/// <summary>
/// make a control to show, for example, the list of tools, or the list of filters.
/// </summary>
/// <param name="group"></param>
protected void MakeListControl(ChoiceGroup group)
{
ListView list= new ListView();
list.View = View.List;
list.Name = group.ListId;
list.Dock = System.Windows.Forms.DockStyle.Top;
list.MultiSelect = false;
list.Tag = group;
list.SmallImageList = m_smallImages.ImageList;
list.LargeImageList = m_largeImages.ImageList;
list.HideSelection = false;
group.ReferenceWidget = list;
// foreach(ChoiceRelatedClass choice in group)
// {
// //Debug.Assert(item is ChoiceBase, "Only things that can be made into buttons should be appearing here.");
// Debug.Assert(choice is ListPropertyChoice, "Only things that can be made into buttons should be appearing here.");
// ListViewItem x =list.Items.Add(choice.Label,1);
// x.Tag = choice;
// }
group.OnDisplay(this, null);
list.SelectedIndexChanged += new EventHandler(OnClickInPanelList);
list.SizeChanged += new EventHandler(list_SizeChanged);
m_panelSubControls.Add(list);
}