本文整理汇总了C#中Gtk.FileChooserDialog.ModifyBg方法的典型用法代码示例。如果您正苦于以下问题:C# FileChooserDialog.ModifyBg方法的具体用法?C# FileChooserDialog.ModifyBg怎么用?C# FileChooserDialog.ModifyBg使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gtk.FileChooserDialog
的用法示例。
在下文中一共展示了FileChooserDialog.ModifyBg方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Build
//.........这里部分代码省略.........
this.checkbutton2.Active = true;
this.checkbutton2.DrawIndicator = true;
this.checkbutton2.UseUnderline = true;
this.colorbutton1.Sensitive = false;
this.checkbutton2.Toggled += delegate(object sender, EventArgs e)
{
this.colorbutton1.Sensitive = !this.checkbutton2.Active;
};
this.hbox1.Add (this.checkbutton2);
this.hbox7.Add(this.hbox1);
this.vbox1.Add (this.hbox7);
global::Gtk.Box.BoxChild w22 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.hbox7]));
w22.PackType = ((global::Gtk.PackType)(1));
w22.Position = 3;
w22.Fill = true;
this.vbox1.BorderWidth = 3;
this.button1.Clicked += delegate(object sender, EventArgs e)
{
FileChooserDialog dia = new FileChooserDialog("Select location",
null,
FileChooserAction.Save,
"Close", ResponseType.Close,
"Ok", ResponseType.Ok);
dia.ModifyFg(StateType.Normal, new Gdk.Color(255, 255, 255));
dia.ModifyBg(StateType.Normal, new Gdk.Color(255, 255, 255));
dia.Icon = Gdk.Pixbuf.LoadFromResource("MeeGen.Resources.document-save.png");
dia.DoOverwriteConfirmation = true;
dia.CurrentName = "meegon." + this.combobox1.ActiveText.Substring(0, 3).ToLower();
FileFilter f = new FileFilter();
f.Name = "SVG";
f.AddMimeType("image/svg+xml");
dia.AddFilter(f);
f = new FileFilter();
f.Name = "PNG";
f.AddMimeType("image/png");
dia.AddFilter(f);
f = new FileFilter();
f.Name = "PDF";
f.AddMimeType("application/pdf");
dia.AddFilter(f);
WidgetHelper.SetButtonRelief(dia, ReliefStyle.None);
dia.SkipTaskbarHint = true;
dia.SetCurrentFolder(this.entry1.Text);
if(dia.Run() == (int)ResponseType.Ok)
{
this.entry1.Text = dia.Filename;
}
dia.Destroy();
};