本文整理汇总了C#中Gtk.Label.Hide方法的典型用法代码示例。如果您正苦于以下问题:C# Gtk.Label.Hide方法的具体用法?C# Gtk.Label.Hide怎么用?C# Gtk.Label.Hide使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gtk.Label
的用法示例。
在下文中一共展示了Gtk.Label.Hide方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateNotebookDialog
public CreateNotebookDialog(Gtk.Window parent,
Gtk.DialogFlags flags)
: base (parent, flags, Gtk.MessageType.Info,
Gtk.ButtonsType.None,
Catalog.GetString ("Create a new notebook"),
Catalog.GetString ("Type the name of the notebook you'd like to create."))
{
this.Pixbuf = newNotebookIconDialog;
Gtk.Table table = new Gtk.Table (2, 2, false);
Gtk.Label label = new Gtk.Label (Catalog.GetString ("N_otebook name:"));
label.Xalign = 0;
label.UseUnderline = true;
label.Show ();
nameEntry = new Gtk.Entry ();
nameEntry.Changed += OnNameEntryChanged;
nameEntry.ActivatesDefault = true;
nameEntry.Show ();
label.MnemonicWidget = nameEntry;
errorLabel = new Gtk.Label ();
errorLabel.Xalign = 0;
errorLabel.Markup = string.Format("<span foreground='red' style='italic'>{0}</span>",
Catalog.GetString ("Name already taken"));
table.Attach (label, 0, 1, 0, 1);
table.Attach (nameEntry, 1, 2, 0, 1);
table.Attach (errorLabel, 1, 2, 1, 2);
table.Show ();
ExtraWidget = table;
AddButton (Gtk.Stock.Cancel, Gtk.ResponseType.Cancel, false);
AddButton (
newNotebookIcon,
// Translation note: This is the Create button in the Create
// New Note Dialog.
Catalog.GetString ("C_reate"),
Gtk.ResponseType.Ok,
true);
// Only let the Ok response be sensitive when
// there's something in nameEntry
SetResponseSensitive (Gtk.ResponseType.Ok, false);
errorLabel.Hide ();
}
示例2: FeedbackDialog
public FeedbackDialog (int x, int y): base (Gtk.WindowType.Toplevel)
{
SetDefaultSize (350, 200);
if (x == -1 && y == -1) {
int ww, wh;
IdeApp.Workbench.RootWindow.GdkWindow.GetSize (out ww, out wh);
IdeApp.Workbench.RootWindow.GdkWindow.GetOrigin (out x, out y);
x = ww / 2 - 350 / 2;
y = wh / 2 - 200 / 2;
Move (x, y);
} else
Move (x - 350, y - 200);
mainFrame = new Gtk.Frame ();
mainBox = new Gtk.VBox ();
mainBox.BorderWidth = 12;
mainBox.Spacing = 6;
headerBox = new Gtk.HBox ();
mailEntry = new EntryWithEmptyMessage ();
mailEntry.EmptyMessage = GettextCatalog.GetString ("email address");
Decorated = false;
mainFrame.ShadowType = Gtk.ShadowType.Out;
// Header
headerBox.Spacing = 6;
mailLabel = new Gtk.Label ();
headerBox.PackStart (mailLabel, false, false, 0);
Gtk.Button changeButton = new Gtk.Button ("(Change)");
changeButton.Relief = Gtk.ReliefStyle.None;
headerBox.PackStart (changeButton, false, false, 0);
changeButton.Clicked += HandleChangeButtonClicked;
mainBox.PackStart (headerBox, false, false, 0);
mainBox.PackStart (mailEntry, false, false, 0);
mailWarningLabel = new Gtk.Label (GettextCatalog.GetString ("Please enter a valid e-mail address"));
mailWarningLabel.Xalign = 0;
mainBox.PackStart (mailWarningLabel, false, false, 0);
// Body
textEntry = new TextViewWithEmptyMessage ();
textEntry.EmptyMessage = GettextCatalog.GetString (
"Tell us how we can make {0} better.",
BrandingService.SuiteName
);
textEntry.AcceptsTab = false;
textEntry.WrapMode = Gtk.WrapMode.Word;
textEntry.WidthRequest = 300;
var sw = new Gtk.ScrolledWindow ();
sw.ShadowType = Gtk.ShadowType.In;
sw.VscrollbarPolicy = Gtk.PolicyType.Automatic;
sw.HscrollbarPolicy = Gtk.PolicyType.Never;
sw.Add (textEntry);
mainBox.PackStart (sw, true, true, 0);
bodyWarningLabel = new Gtk.Label (GettextCatalog.GetString ("Please enter some feedback"));
bodyWarningLabel.Xalign = 0;
mainBox.PackStart (bodyWarningLabel, false, false, 0);
// Bottom
Gtk.HBox bottomBox = new Gtk.HBox (false, 6);
Gtk.Label countLabel = new Gtk.Label ();
countLabel.Xalign = 0;
bottomBox.PackStart (countLabel, false, false, 0);
Gtk.Button sendButton = new Gtk.Button (GettextCatalog.GetString ("Send Feedback"));
sendButton.Clicked += HandleSendButtonClicked;
bottomBox.PackEnd (sendButton, false, false, 0);
mainBox.PackStart (bottomBox, false, false, 0);
// Init
mainBox.ShowAll ();
mailWarningLabel.Hide ();
bodyWarningLabel.Hide ();
string mail = FeedbackService.ReporterEMail;
if (string.IsNullOrEmpty (mail))
mail = AuthorInformation.Default.Email;
if (string.IsNullOrEmpty (mail)) {
headerBox.Hide ();
mailEntry.GrabFocus ();
}
else {
mailEntry.Text = mail;
mailEntry.Hide ();
mailLabel.Text = GettextCatalog.GetString ("From: {0}", mail);
textEntry.GrabFocus ();
}
if (FeedbackService.FeedbacksSent > 0)
countLabel.Text = GettextCatalog.GetString ("Your feedbacks: {0}", FeedbackService.FeedbacksSent);
else
countLabel.Hide ();
mainFrame.Show ();
mainFrame.Add (mainBox);
Add (mainFrame);
//.........这里部分代码省略.........