本文整理汇总了C#中Gtk.Entry.InsertText方法的典型用法代码示例。如果您正苦于以下问题:C# Entry.InsertText方法的具体用法?C# Entry.InsertText怎么用?C# Entry.InsertText使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gtk.Entry
的用法示例。
在下文中一共展示了Entry.InsertText方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Build
//.........这里部分代码省略.........
templatesTreeView = new TreeView ();
templatesTreeView.Name = "templatesTreeView";
templatesTreeView.HeadersVisible = false;
templatesTreeView.Model = templatesListStore;
templatesTreeView.ModifyBase (StateType.Normal, templateListBackgroundColor);
templatesTreeView.AppendColumn (CreateTemplateListTreeViewColumn ());
templatesScrolledWindow.Add (templatesTreeView);
templatesVBox.PackStart (templatesScrolledWindow, true, true, 0);
// Template
var templateEventBox = new EventBox ();
templateEventBox.Name = "templateEventBox";
templateEventBox.ModifyBg (StateType.Normal, templateBackgroundColor);
templatesHBox.PackStart (templateEventBox, true, true, 0);
templateVBox = new VBox ();
templateVBox.Visible = false;
templateVBox.BorderWidth = 20;
templateVBox.Spacing = 10;
templateEventBox.Add (templateVBox);
// Template large image.
templateImage = new ImageView ();
templateImage.Name = "templateImage";
templateImage.HeightRequest = 140;
templateImage.WidthRequest = 240;
templateVBox.PackStart (templateImage, false, false, 10);
// Template description.
templateNameLabel = new Label ();
templateNameLabel.Name = "templateNameLabel";
templateNameLabel.WidthRequest = 240;
templateNameLabel.Wrap = true;
templateNameLabel.Xalign = 0;
templateNameLabel.Markup = MarkupTemplateName ("TemplateName");
templateVBox.PackStart (templateNameLabel, false, false, 0);
templateDescriptionLabel = new Label ();
templateDescriptionLabel.Name = "templateDescriptionLabel";
templateDescriptionLabel.WidthRequest = 240;
templateDescriptionLabel.Wrap = true;
templateDescriptionLabel.Xalign = 0;
templateVBox.PackStart (templateDescriptionLabel, false, false, 0);
templateVBox.PackStart (new Label (), true, true, 0);
// Template - button separator.
var templateSectionSeparatorEventBox = new EventBox ();
templateSectionSeparatorEventBox.Name = "templateSectionSeparatorEventBox";
templateSectionSeparatorEventBox.HeightRequest = 1;
templateSectionSeparatorEventBox.ModifyBg (StateType.Normal, templateSectionSeparatorColor);
VBox.PackStart (templateSectionSeparatorEventBox, false, false, 0);
// Buttons at bottom of dialog.
var bottomHBox = new HBox ();
bottomHBox.Name = "bottomHBox";
VBox.PackStart (bottomHBox, false, false, 0);
// Cancel button - bottom left.
var cancelButtonBox = new HButtonBox ();
cancelButtonBox.Name = "cancelButtonBox";
cancelButtonBox.BorderWidth = 16;
cancelButton = new Button ();
cancelButton.Label = "gtk-cancel";
cancelButton.UseStock = true;
cancelButtonBox.PackStart (cancelButton, false, false, 0);
bottomHBox.PackStart (cancelButtonBox, false, false, 0);
// Previous button - bottom right.
var previousNextButtonBox = new HButtonBox ();
previousNextButtonBox.Name = "previousNextButtonBox";
previousNextButtonBox.BorderWidth = 16;
previousNextButtonBox.Spacing = 9;
bottomHBox.PackStart (previousNextButtonBox);
previousNextButtonBox.Layout = ButtonBoxStyle.End;
previousButton = new Button ();
previousButton.Name = "previousButton";
previousButton.Label = GettextCatalog.GetString ("Previous");
previousButton.Sensitive = false;
previousNextButtonBox.PackEnd (previousButton);
// Next button - bottom right.
nextButton = new Button ();
nextButton.Name = "nextButton";
nextButton.Label = GettextCatalog.GetString ("Next");
previousNextButtonBox.PackEnd (nextButton);
// Remove default button action area.
VBox.Remove (ActionArea);
if (Child != null) {
Child.ShowAll ();
}
Show ();
topSearchBox.ModifyText(StateType.Normal, new Color(128, 128, 128));
topSearchBox.InsertText("Search online...");
templatesTreeView.HasFocus = true;
Resizable = false;
}
开发者ID:Protobuild,项目名称:Protobuild.IDE.MonoDevelop,代码行数:101,代码来源:GtkNewProtobuildModuleDialogBackend.UI.cs