本文整理汇总了C#中Gtk.Button.Remove方法的典型用法代码示例。如果您正苦于以下问题:C# Button.Remove方法的具体用法?C# Button.Remove怎么用?C# Button.Remove使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gtk.Button
的用法示例。
在下文中一共展示了Button.Remove方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: create_button_stock_image
public static Button create_button_stock_image(String stockid,String tooltip){
Button tb = new Button(stockid);
tb.Remove(tb.Child);
VBox v = new VBox();
v.Add(new Gtk.Image(tb.RenderIcon(stockid,IconSize.SmallToolbar,tooltip)));
tb.Add(v);
tb.WidthRequest = 30;
tb.CanFocus = false;
tb.TooltipText = tooltip;
tb.HasTooltip = true;
return tb;
}
示例2: ShowAccountForm
public void ShowAccountForm()
{
Reset ();
VBox layout_vertical = new VBox (false, 0);
DeleteEvent += PreventClose;
Label header = new Label ("<span size='x-large'><b>" +
_("Welcome to SparkleShare!") +
"</b></span>") {
UseMarkup = true,
Xalign = 0
};
Label information = new Label (_("Before we can create a SparkleShare folder on this " +
"computer, we need a few bits of information from you.")) {
Xalign = 0,
Wrap = true
};
Table table = new Table (4, 2, true) {
RowSpacing = 6
};
UnixUserInfo unix_user_info = new UnixUserInfo (UnixEnvironment.UserName);
Label name_label = new Label ("<b>" + _("Full Name:") + "</b>") {
UseMarkup = true,
Xalign = 0
};
NameEntry = new Entry (unix_user_info.RealName);
NameEntry.Changed += delegate {
CheckAccountForm ();
};
EmailEntry = new Entry (SparkleShare.Controller.UserEmail);
EmailEntry.Changed += delegate {
CheckAccountForm ();
};
Label email_label = new Label ("<b>" + _("Email:") + "</b>") {
UseMarkup = true,
Xalign = 0
};
table.Attach (name_label, 0, 1, 0, 1);
table.Attach (NameEntry, 1, 2, 0, 1);
table.Attach (email_label, 0, 1, 1, 2);
table.Attach (EmailEntry, 1, 2, 1, 2);
NextButton = new Button (_("Next")) {
Sensitive = false
};
NextButton.Clicked += delegate (object o, EventArgs args) {
NextButton.Remove (NextButton.Child);
NextButton.Add (new Label (_("Configuring…")));
NextButton.Sensitive = false;
table.Sensitive = false;
NextButton.ShowAll ();
SparkleShare.Controller.UserName = NameEntry.Text;
SparkleShare.Controller.UserEmail = EmailEntry.Text;
SparkleShare.Controller.GenerateKeyPair ();
SparkleShare.Controller.AddKey ();
SparkleShare.Controller.FirstRun = false;
DeleteEvent += PreventClose;
ShowServerForm ();
};
AddButton (NextButton);
layout_vertical.PackStart (header, false, false, 0);
layout_vertical.PackStart (information, false, false, 21);
layout_vertical.PackStart (new Label (""), false, false, 0);
layout_vertical.PackStart (table, false, false, 0);
Add (layout_vertical);
CheckAccountForm ();
ShowAll ();
}