本文整理汇总了C#中Gtk.Widget.Destroy方法的典型用法代码示例。如果您正苦于以下问题:C# Widget.Destroy方法的具体用法?C# Widget.Destroy怎么用?C# Widget.Destroy使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gtk.Widget
的用法示例。
在下文中一共展示了Widget.Destroy方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: addPage
private void addPage (Widget widget, string label) {
HBox hBox = new HBox ();
hBox.Add(new Label (label));
Button button = new Button (new Image (Stock.Cancel, IconSize.Button ));
hBox.Add (button);
hBox.ShowAll();
notebook1.AppendPage (widget, new Label(label));
button.Clicked += delegate {
widget.Destroy ();
};
}
示例2: AddPage
private void AddPage(Widget widget)
{
HBox hbox = new HBox();
hbox.PackStart(new Label("Label"));
Button closeButton = new Button("X");
closeButton.Relief = ReliefStyle.None;
closeButton.FocusOnClick = false;
closeButton.Clicked += delegate {
hbox.Destroy();
widget.Destroy();
};
hbox.PackStart(closeButton);
hbox.ShowAll();
notebook.AppendPage(widget, hbox);
notebook.ShowAll();
}
示例3: TableRemoveRow
static void TableRemoveRow (Table table, uint row, Widget column1, Widget column2, bool destroy)
{
uint rows = table.NRows;
foreach (var child in table.Children) {
var tr = (Table.TableChild) table[child];
uint bottom = tr.BottomAttach;
uint top = tr.TopAttach;
if (top >= row && top < rows) {
tr.BottomAttach = bottom - 1;
tr.TopAttach = top - 1;
}
}
if (column1 != null) {
table.Remove (column1);
if (destroy)
column1.Destroy ();
}
if (column2 != null) {
table.Remove (column2);
if (destroy)
column2.Destroy ();
}
table.NRows--;
}
示例4: DestroyPanel
void DestroyPanel(Widget panel)
{
if (panel is IPanel) {
(panel as IPanel).BackEvent -= BackClicked;
}
panel.Destroy ();
panel.Dispose ();
System.GC.Collect ();
}
示例5: RemoveFromTable
void RemoveFromTable (Widget widget)
{
configurationTable.Remove (widget);
widget.Destroy ();
}