本文整理汇总了C#中VBox.Remove方法的典型用法代码示例。如果您正苦于以下问题:C# VBox.Remove方法的具体用法?C# VBox.Remove怎么用?C# VBox.Remove使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类VBox
的用法示例。
在下文中一共展示了VBox.Remove方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ScrollWindowSample
public ScrollWindowSample()
{
ScrollView v1 = new ScrollView ();
VBox b1 = new VBox ();
for (int n=0; n<30; n++)
b1.PackStart (new Label ("Line " + n), BoxMode.None);
Button u = new Button ("Click to remove");
u.Clicked += delegate {
b1.Remove (u);
};
b1.PackStart (u);
v1.Content = b1;
v1.VerticalScrollPolicy = ScrollPolicy.Always;
v1.BorderVisible = false;
PackStart (v1, BoxMode.FillAndExpand);
ScrollView v2 = new ScrollView ();
VBox b2 = new VBox ();
for (int n=0; n<10; n++)
b2.PackStart (new Label ("Line " + n), BoxMode.None);
v2.Content = b2;
v2.VerticalScrollPolicy = ScrollPolicy.Never;
PackStart (v2, BoxMode.FillAndExpand);
ScrollView v3 = new ScrollView ();
VBox b3 = new VBox ();
Button b = new Button ("Click to add items");
b.Clicked += delegate {
for (int n=0; n<10; n++)
b3.PackStart (new Label ("Line " + n), BoxMode.None);
};
b3.PackStart (b);
v3.Content = b3;
v3.VerticalScrollPolicy = ScrollPolicy.Automatic;
PackStart (v3, BoxMode.FillAndExpand);
ScrollView v4 = new ScrollView ();
PackStart (v4, BoxMode.FillAndExpand);
var sb = new ScrollableCanvas ();
v4.Content = sb;
v4.VerticalScrollPolicy = ScrollPolicy.Always;
}