当前位置: 首页>>代码示例>>C#>>正文


C# Gtk.HBox类代码示例

本文整理汇总了C#中Gtk.HBox的典型用法代码示例。如果您正苦于以下问题:C# Gtk.HBox类的具体用法?C# Gtk.HBox怎么用?C# Gtk.HBox使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Gtk.HBox类属于命名空间,在下文中一共展示了Gtk.HBox类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: QueryWidget

		public QueryWidget (PhotoQuery query, Db db, TagSelectionWidget selector)
		{
			tips.Enable ();

			this.query = query;
			query.Changed += HandleChanged;

			Gtk.HSeparator sep = new Gtk.HSeparator ();
			sep.Show ();
			this.PackStart (sep, false, false, 0);
			
			Gtk.HBox hbox = new Gtk.HBox ();
			hbox.Show ();
			this.PackStart (hbox, false, false, 0);
			
			label = new Gtk.Label (Catalog.GetString ("Find: "));
			label.Show ();
			label.Ypad = 9;
			hbox.PackStart (label, false, false, 0);

			untagged = new Gtk.Label (Catalog.GetString ("Untagged photos"));
			untagged.Visible = false;
			hbox.PackStart (untagged, false, false, 0);

			comma_label = new Gtk.Label (", ");
			comma_label.Visible = false;
			hbox.PackStart (comma_label, false, false, 0);

			rollfilter = new Gtk.Label (Catalog.GetString ("Import roll"));	
			rollfilter.Visible = false;
			hbox.PackStart (rollfilter, false, false, 0);

			logic_widget = new LogicWidget (query, db.Tags, selector);
			logic_widget.Show ();
			hbox.PackStart (logic_widget, true, true, 0);

			warning_box = new Gtk.HBox ();
			warning_box.PackStart (new Gtk.Label (System.String.Empty));
			
			Gtk.Image warning_image = new Gtk.Image ("gtk-info", Gtk.IconSize.Button);
			warning_image.Show ();
			warning_box.PackStart (warning_image, false, false, 0);
			
			clear_button = new Gtk.Button ();
			clear_button.Add (new Gtk.Image ("gtk-close", Gtk.IconSize.Button));
			clear_button.Clicked += HandleClearButtonClicked;
			clear_button.Relief = Gtk.ReliefStyle.None;
			hbox.PackEnd (clear_button, false, false, 0);
			tips.SetTip (clear_button, Catalog.GetString("Clear search"), null);

			Gtk.Label warning = new Gtk.Label (Catalog.GetString ("No matching photos found"));
			warning_box.PackStart (warning, false, false, 0);
			warning_box.ShowAll ();
			warning_box.Spacing = 6;
			warning_box.Visible = false;

			hbox.PackEnd (warning_box, false, false, 0);
			
			warning_box.Visible = false;
		}
开发者ID:AminBonyadUni,项目名称:facedetect-f-spot,代码行数:60,代码来源:QueryWidget.cs

示例2: Build

 private void Build()
 {
     global::Stetic.Gui.Initialize(this);
     // Widget Client.Forms.ConfigFile
     this.Name = "Client.Forms.ConfigFile";
     this.Title = "ConfigFile";
     this.WindowPosition = ((global::Gtk.WindowPosition)(4));
     Gtk.VBox vbox1 = new global::Gtk.VBox();
     vbox1.Name = "vbox1";
     vbox1.Spacing = 6;
     Gtk.HBox hbox1 = new Gtk.HBox();
     hbox1.Name = "hbox";
     Gtk.ScrolledWindow GtkScrolledWindow = new global::Gtk.ScrolledWindow();
     GtkScrolledWindow.Name = "GtkScrolledWindow";
     GtkScrolledWindow.ShadowType = ((global::Gtk.ShadowType)(1));
     textview1 = new Gtk.TextView();
     vbox1.Add(GtkScrolledWindow);
     GtkScrolledWindow.Add(textview1);
     vbox1.Add(hbox1);
     global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(vbox1[hbox1]));
     w6.Position = 2;
     w6.Expand = false;
     w6.Fill = false;
     button3 = new Gtk.Button();
     button3.Name = "button3";
     button3.UseUnderline = true;
     button3.Label = "Save";
     //button3.SetSizeRequest(220, 20);
     button3.Clicked += new EventHandler(button1_Click);
     hbox1.Add(button3);
     global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(hbox1[this.button3]));
     w3.Position = 0;
     w3.Expand = false;
     w3.Fill = false;
     button4 = new Gtk.Button();
     button4.UseUnderline = true;
     button4.Name = "button4";
     //button4.SetSizeRequest(200, 20);
     button4.Label = "Check syntax";
     button4.Clicked += new EventHandler(button2_Click);
     hbox1.Add(button4);
     global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(hbox1[this.button4]));
     w4.Position = 0;
     w4.Expand = false;
     w4.Fill = false;
     this.label = new Gtk.Label();
     label.Name = "label";
     label.Text = "L 0 C 0";
     hbox1.Add(label);
     textview1.MoveCursor += new Gtk.MoveCursorHandler(cursor);
     this.Add(vbox1);
     if ((this.Child != null))
     {
         this.Child.ShowAll();
     }
     this.Icon = Gdk.Pixbuf.LoadFromResource("Client.Resources.pigeon_clip_art_hight.ico");
     this.DefaultWidth = 680;
     this.DefaultHeight = 480;
     this.Show();
 }
开发者ID:JGunning,项目名称:OpenAIM,代码行数:60,代码来源:ConfigFile.cs

示例3: ImageButton

 public ImageButton(string stock, string label)
 {
     Gtk.HBox hbox1 = new Gtk.HBox(false,0);
     hbox1.PackStart(new Gtk.Image(stock, Gtk.IconSize.Button), false, true, 0);
     hbox1.PackStart(new Gtk.Label(label), true, true, 0);
     this.Add(hbox1);
 }
开发者ID:slluis,项目名称:monodevelop-prehistoric,代码行数:7,代码来源:ResourceService.cs

示例4: OnViewBoxes

        private void OnViewBoxes()
        {
            var dlg = new Gtk.Dialog( "Boxes", this, Gtk.DialogFlags.Modal );

            var hbBox1 = new Gtk.HBox( false, 5 );
            hbBox1.Add( new Gtk.Label( "This is hbox 1" ) );
            var hbBox2 = new Gtk.HBox( false, 5 );
            hbBox2.Add( new Gtk.Label( "This is hbox 2" ) );
            var hbBox3 = new Gtk.HBox( false, 5 );
            hbBox3.Add( new Gtk.Label( "This is hbox 3" ) );

            dlg.VBox.PackStart( hbBox1, true, true, 5 );
            dlg.VBox.PackStart( hbBox2, true, true, 5 );
            dlg.VBox.PackStart( hbBox3, true, true, 5 );

            dlg.SetGeometryHints(
                dlg,
                new Gdk.Geometry() {
                    MinHeight = 200,
                    MinWidth = 320
                },
                Gdk.WindowHints.MinSize
            );

            dlg.AddButton( "Ok", Gtk.ResponseType.Ok );
            dlg.ShowAll();
            dlg.Run();
            dlg.Destroy();
        }
开发者ID:Baltasarq,项目名称:GTKSharpDemo,代码行数:29,代码来源:MainWindowCore.cs

示例5: Fill

		public void Fill (Extension ext, ITreeNavigator nav)
		{
			labelName.Markup = "<small>Extension</small>\n<big><b>" + GLib.Markup.EscapeText (Util.GetDisplayName (ext)) + "</b></big>";
			object parent = ext.GetExtendedObject ();
			
			if (parent is ExtensionPoint) {
				ExtensionPoint ep = (ExtensionPoint) parent;
				string txt = "<small>Extension Point</small>\n<b>" + GLib.Markup.EscapeText (Util.GetDisplayName (ep)) + "</b>";
				if (!string.IsNullOrEmpty (ep.Description))
					txt += "\n" + GLib.Markup.EscapeText (ep.Description);
				Gtk.Label lab = new Gtk.Label ();
				lab.Xalign = lab.Yalign = 0;
				lab.Markup = txt;
				lab.WidthRequest = 400;
				lab.Wrap = true;
				Gtk.Image img = new Gtk.Image (ImageService.GetPixbuf ("md-extension-point", Gtk.IconSize.Menu));
				img.Yalign = 0;
				Gtk.HBox box = new Gtk.HBox (false, 6);
				box.PackStart (img, false, false, 0);
				box.PackStart (lab, true, true, 0);
				buttonExt.Add (box);
				buttonExt.ShowAll ();
				buttonExt.Clicked += delegate {
					if (nav.MoveToObject (ext)) {
						nav.MoveToParent (typeof(Solution));
						nav.Expanded = true;
						if (nav.MoveToObject (ep.ParentAddinDescription)) {
							nav.Expanded = true;
							if (nav.MoveToObject (ep))
								nav.Selected = true;
						}
					}
				};
			}
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:35,代码来源:ExtensionView.cs

示例6: InitializeComponents

		void InitializeComponents()
		{
			// set up this actual dialog
			this.Modal = true;
			// FIXME: make this a resource in the resource file
			this.Title = String.Format (GettextCatalog.GetString ("{0} Code Group"), titlePrefix);
			
			// set up the dialog fields and add them
			templateExtensionsTextBox = new Gtk.Entry();
			templateExtensionsTextBox.ActivatesDefault = true;
			// FIXME: make this a resource in the resource file
			Gtk.Label label1 = new Gtk.Label("Extensions (; seperated)");
			
			label1.Xalign = 0;			
			templateExtensionsTextBox.Text    = string.Join(";", codeTemplateGroup.ExtensionStrings);
			
			// FIXME: make the labels both part of the same sizing group so they have the same left and right rows.
			Gtk.HBox hBox1 = new Gtk.HBox(false, 6);
			hBox1.PackStart(label1, false, false, 6);
			hBox1.PackStart(templateExtensionsTextBox, false, false, 6);
			
			this.VBox.PackStart(hBox1, false, false, 6);
			
			// set up the buttons and add them
			this.DefaultResponse = Gtk.ResponseType.Ok;
			Gtk.Button cancelButton = new Gtk.Button(Gtk.Stock.Cancel);
			Gtk.Button okButton = new Gtk.Button(Gtk.Stock.Ok);
			okButton.Clicked += new EventHandler(AcceptEvent);
			cancelButton.Clicked += new EventHandler(CancelEvent);
			this.AddActionWidget (cancelButton, Gtk.ResponseType.Cancel);
			this.AddActionWidget (okButton, (int) Gtk.ResponseType.Ok);
		}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:32,代码来源:EditTemplateGroupDialog.cs

示例7: EngineManagerDialog

        public EngineManagerDialog(EngineManager engineManager)
        {
            Trace.Call(engineManager);

            if (engineManager == null) {
                throw new ArgumentNullException("engineManager");
            }

            _EngineManager = engineManager;

            Modal = true;
            Title = "Smuxi - " + _("Engine Manager");
            SetPosition(Gtk.WindowPosition.CenterAlways);

            Gtk.HBox connect_hbox = new Gtk.HBox();
            Gtk.Image connect_image = new Gtk.Image(
                new Gdk.Pixbuf(null, "connect-button.svg", 22, 22));
            connect_hbox.Add(connect_image);
            connect_hbox.Add(new Gtk.Label(_("_Connect")));
            AddActionWidget(new Gtk.Button(connect_hbox), 1);

            AddActionWidget(new Gtk.Button(Gtk.Stock.New), 3);

            Gtk.Button edit_button = new Gtk.Button(Gtk.Stock.Edit);
            _EditButton = edit_button;
            AddActionWidget(edit_button, 2);

            _DeleteButton = new Gtk.Button(Gtk.Stock.Delete);
            AddActionWidget(_DeleteButton, 4);
            AddActionWidget(new Gtk.Button(Gtk.Stock.Quit), 5);
            Response += new Gtk.ResponseHandler(_OnResponse);

            Gtk.VBox vbox = new Gtk.VBox();
            Gtk.Label label = new Gtk.Label("<b>" +
                                            _("Select which Smuxi engine you want to connect to") +
                                            "</b>");
            label.UseMarkup = true;
            vbox.PackStart(label, false, false, 5);

            Gtk.HBox hbox = new Gtk.HBox();
            hbox.PackStart(new Gtk.Label(_("Engine:")), false, false, 5);

            _ListStore = new Gtk.ListStore(typeof(string));
            _ComboBox = new Gtk.ComboBox();
            Gtk.CellRendererText cell = new Gtk.CellRendererText();
            _ComboBox.PackStart(cell, false);
            _ComboBox.AddAttribute(cell, "text", 0);
            _ComboBox.Changed += new EventHandler(_OnComboBoxChanged);
            _ComboBox.Model = _ListStore;
            _InitEngineList();

            hbox.PackStart(_ComboBox, true, true, 10);

            vbox.PackStart(hbox, false, false, 10);

            VBox.Add(vbox);

            ShowAll();
        }
开发者ID:tuukka,项目名称:smuxi,代码行数:59,代码来源:EngineManagerDialog.cs

示例8: Build

 protected virtual void Build()
 {
     Stetic.Gui.Initialize(this);
     // Widget ControlWrappers.BoundTime
     Stetic.BinContainer.Attach(this);
     this.Name = "ControlWrappers.BoundTime";
     // Container child ControlWrappers.BoundTime.Gtk.Container+ContainerChild
     this.hbox1 = new Gtk.HBox();
     this.hbox1.Name = "hbox1";
     this.hbox1.Spacing = 6;
     // Container child hbox1.Gtk.Box+BoxChild
     this.lblHour = new Gtk.Label();
     this.lblHour.Name = "lblHour";
     this.lblHour.LabelProp = Mono.Unix.Catalog.GetString("H:");
     this.hbox1.Add(this.lblHour);
     Gtk.Box.BoxChild w1 = ((Gtk.Box.BoxChild)(this.hbox1[this.lblHour]));
     w1.Position = 0;
     w1.Expand = false;
     w1.Fill = false;
     // Container child hbox1.Gtk.Box+BoxChild
     this.sbHour = new Gtk.SpinButton(0, 23, 1);
     this.sbHour.CanFocus = true;
     this.sbHour.Name = "sbHour";
     this.sbHour.Adjustment.PageIncrement = 10;
     this.sbHour.ClimbRate = 1;
     this.sbHour.Numeric = true;
     this.hbox1.Add(this.sbHour);
     Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(this.hbox1[this.sbHour]));
     w2.Position = 1;
     w2.Expand = false;
     w2.Fill = false;
     // Container child hbox1.Gtk.Box+BoxChild
     this.lblMinute = new Gtk.Label();
     this.lblMinute.Name = "lblMinute";
     this.lblMinute.LabelProp = Mono.Unix.Catalog.GetString("M:");
     this.hbox1.Add(this.lblMinute);
     Gtk.Box.BoxChild w3 = ((Gtk.Box.BoxChild)(this.hbox1[this.lblMinute]));
     w3.Position = 2;
     w3.Expand = false;
     w3.Fill = false;
     // Container child hbox1.Gtk.Box+BoxChild
     this.sbMinute = new Gtk.SpinButton(0, 59, 1);
     this.sbMinute.CanFocus = true;
     this.sbMinute.Name = "sbMinute";
     this.sbMinute.Adjustment.PageIncrement = 10;
     this.sbMinute.ClimbRate = 1;
     this.sbMinute.Numeric = true;
     this.hbox1.Add(this.sbMinute);
     Gtk.Box.BoxChild w4 = ((Gtk.Box.BoxChild)(this.hbox1[this.sbMinute]));
     w4.Position = 3;
     w4.Expand = false;
     w4.Fill = false;
     this.Add(this.hbox1);
     if ((this.Child != null)) {
         this.Child.ShowAll();
     }
     this.Hide();
 }
开发者ID:Ripper555,项目名称:DynamicPropertyManagement,代码行数:58,代码来源:ControlWrappers.BoundTime.cs

示例9: Build

 protected virtual void Build()
 {
     Stetic.Gui.Initialize(this);
     // Widget Bot.DialogError
     this.Name = "Bot.DialogError";
     this.Title = Mono.Unix.Catalog.GetString("Error");
     this.Icon = Stetic.IconLoader.LoadIcon(this, "gtk-dialog-error", Gtk.IconSize.Menu, 16);
     this.TypeHint = ((Gdk.WindowTypeHint)(1));
     this.WindowPosition = ((Gtk.WindowPosition)(4));
     this.AllowShrink = true;
     this.HasSeparator = false;
     // Internal child Bot.DialogError.VBox
     Gtk.VBox w1 = this.VBox;
     w1.Name = "dialog1_VBox";
     w1.BorderWidth = ((uint)(2));
     // Container child dialog1_VBox.Gtk.Box+BoxChild
     this.hbox4 = new Gtk.HBox();
     this.hbox4.Name = "hbox4";
     this.hbox4.Spacing = 6;
     // Container child hbox4.Gtk.Box+BoxChild
     this.label9 = new Gtk.Label();
     this.label9.Name = "label9";
     this.label9.LabelProp = Mono.Unix.Catalog.GetString("Error al Connectarse");
     this.hbox4.Add(this.label9);
     Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(this.hbox4[this.label9]));
     w2.Position = 1;
     w2.Expand = false;
     w2.Fill = false;
     w1.Add(this.hbox4);
     Gtk.Box.BoxChild w3 = ((Gtk.Box.BoxChild)(w1[this.hbox4]));
     w3.Position = 0;
     w3.Expand = false;
     w3.Fill = false;
     // Internal child Bot.DialogError.ActionArea
     Gtk.HButtonBox w4 = this.ActionArea;
     w4.Name = "dialog1_ActionArea";
     w4.Spacing = 6;
     w4.BorderWidth = ((uint)(5));
     w4.LayoutStyle = ((Gtk.ButtonBoxStyle)(4));
     // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
     this.buttonOk = new Gtk.Button();
     this.buttonOk.CanDefault = true;
     this.buttonOk.CanFocus = true;
     this.buttonOk.Name = "buttonOk";
     this.buttonOk.UseStock = true;
     this.buttonOk.UseUnderline = true;
     this.buttonOk.Label = "gtk-ok";
     this.AddActionWidget(this.buttonOk, -5);
     Gtk.ButtonBox.ButtonBoxChild w5 = ((Gtk.ButtonBox.ButtonBoxChild)(w4[this.buttonOk]));
     w5.Expand = false;
     w5.Fill = false;
     if ((this.Child != null)) {
         this.Child.ShowAll();
     }
     this.DefaultWidth = 264;
     this.DefaultHeight = 141;
     this.Show();
 }
开发者ID:ibarra,项目名称:bot,代码行数:58,代码来源:Bot.DialogError.cs

示例10: CrashDialog

        public CrashDialog(Gtk.Window parent, Exception e)
            : base(null, parent, Gtk.DialogFlags.Modal)
        {
            SetDefaultSize(640, 480);
            Title = "Smuxi - " + _("Oops, I did it again...");

            Gtk.HBox hbox = new Gtk.HBox();

            Gtk.Image image = new Gtk.Image(Gtk.Stock.DialogError, Gtk.IconSize.Dialog);
            hbox.PackStart(image, false, false, 2);

            Gtk.VBox label_vbox = new Gtk.VBox();
            Gtk.Label label1 = new Gtk.Label();
            Gtk.Label label2 = new Gtk.Label();
            label1.Markup = String.Format(
                "<b>{0}</b>",
                GLib.Markup.EscapeText(
                    _("Smuxi crashed because an unhandled exception was thrown!")
                )
            );
            label2.Markup = GLib.Markup.EscapeText(
                _("Here is the stacktrace, please report this bug!")
            );
            label_vbox.PackStart(label1, false, false, 0);
            label_vbox.PackStart(new Gtk.Fixed(), true, true, 0);
            label_vbox.PackStart(label2, false, false, 0);
            hbox.PackStart(label_vbox, true, true, 0);

            Gtk.VBox vbox = new Gtk.VBox();
            vbox.PackStart(hbox, false, false, 2);

            Gtk.ScrolledWindow sw = new Gtk.ScrolledWindow();
            sw.ShadowType = Gtk.ShadowType.In;
            Gtk.TextView tv = new Gtk.TextView();
            tv.Editable = false;
            tv.CursorVisible = false;
            sw.Add(tv);
            vbox.PackStart(sw, true, true, 2);

            // add to the dialog
            VBox.PackStart(vbox, true, true, 2);
            AddButton(_("_Report Bug"), -1);
            AddButton(Gtk.Stock.Quit, 0);

            string message = String.Empty;
            if (e.InnerException != null) {
                message = "Inner-Exception Type:\n"+e.InnerException.GetType()+"\n\n"+
                          "Inner-Exception Message:\n"+e.InnerException.Message+"\n\n"+
                          "Inner-Exception StackTrace:\n"+e.InnerException.StackTrace+"\n";
            }
            message += "Exception Type:\n"+e.GetType()+"\n\n"+
                       "Exception Message:\n"+e.Message+"\n\n"+
                       "Exception StackTrace:\n"+e.StackTrace;
            tv.Buffer.Text = message;

            ShowAll();
        }
开发者ID:tuukka,项目名称:smuxi,代码行数:57,代码来源:CrashDialog.cs

示例11: Build

 protected virtual void Build()
 {
     Stetic.Gui.Initialize(this);
     // Widget ocmgtk.CoordinateWidget
     Stetic.BinContainer.Attach(this);
     this.Name = "ocmgtk.CoordinateWidget";
     // Container child ocmgtk.CoordinateWidget.Gtk.Container+ContainerChild
     this.hbox5 = new Gtk.HBox();
     this.hbox5.Name = "hbox5";
     this.hbox5.Spacing = 6;
     // Container child hbox5.Gtk.Box+BoxChild
     this.directionCombo = Gtk.ComboBox.NewText();
     this.directionCombo.WidthRequest = 50;
     this.directionCombo.Name = "directionCombo";
     this.hbox5.Add(this.directionCombo);
     Gtk.Box.BoxChild w1 = ((Gtk.Box.BoxChild)(this.hbox5[this.directionCombo]));
     w1.Position = 0;
     w1.Expand = false;
     // Container child hbox5.Gtk.Box+BoxChild
     this.degreeEntry = new Gtk.Entry();
     this.degreeEntry.CanFocus = true;
     this.degreeEntry.Name = "degreeEntry";
     this.degreeEntry.Text = "000";
     this.degreeEntry.IsEditable = true;
     this.degreeEntry.WidthChars = 3;
     this.degreeEntry.MaxLength = 3;
     this.degreeEntry.InvisibleChar = '•';
     this.hbox5.Add(this.degreeEntry);
     Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(this.hbox5[this.degreeEntry]));
     w2.Position = 1;
     w2.Expand = false;
     // Container child hbox5.Gtk.Box+BoxChild
     this.label9 = new Gtk.Label();
     this.label9.Name = "label9";
     this.label9.LabelProp = Mono.Unix.Catalog.GetString("°");
     this.hbox5.Add(this.label9);
     Gtk.Box.BoxChild w3 = ((Gtk.Box.BoxChild)(this.hbox5[this.label9]));
     w3.Position = 2;
     w3.Expand = false;
     w3.Fill = false;
     // Container child hbox5.Gtk.Box+BoxChild
     this.minuteEntry = new Gtk.Entry();
     this.minuteEntry.CanFocus = true;
     this.minuteEntry.Name = "minuteEntry";
     this.minuteEntry.Text = "0.000";
     this.minuteEntry.IsEditable = true;
     this.minuteEntry.InvisibleChar = '•';
     this.hbox5.Add(this.minuteEntry);
     Gtk.Box.BoxChild w4 = ((Gtk.Box.BoxChild)(this.hbox5[this.minuteEntry]));
     w4.Position = 3;
     this.Add(this.hbox5);
     if ((this.Child != null)) {
         this.Child.ShowAll();
     }
     this.Hide();
 }
开发者ID:cbuehler,项目名称:opencachemanager,代码行数:56,代码来源:ocmgtk.CoordinateWidget.cs

示例12: CustomBuild

        public void CustomBuild()
        {
            this.vboxWindow = new Gtk.VBox ();
            this.vboxWindow.Name = "vboxWindow";

            this.evntboxTitleBar = new Gtk.EventBox ();
            this.evntboxTitleBar.Name = "evntboxTitleBar";
            this.evntboxTitleBar.Visible = false;
            this.evntboxTitleBar.ChildVisible = false;
            this.evntboxTitleBar.Sensitive = false;
            this.vboxWindow.PackStart(this.evntboxTitleBar, false, false, 0);

            this.vboxClient = new Gtk.VBox ();
            this.vboxClient.Name = "vboxClient";
            this.vboxWindow.PackStart(this.vboxClient, true, true, 0);

            this.hboxTitleBar = new Gtk.HBox ();
            this.hboxTitleBar.Name = "hboxTitleBar";
            this.evntboxTitleBar.Add (this.hboxTitleBar);

            this.labelCaption = new Gtk.Label ();
            this.labelCaption.Name = "labelCaption";
            this.labelCaption.Xalign = 0f;
            this.labelCaption.LabelProp = Mono.Unix.Catalog.GetString ("Title");
            this.labelCaption.SingleLineMode = true;
            this.hboxTitleBar.PackStart (this.labelCaption, true, true, 0);

            this.btnMinimize = new Gtk.Button ();
            this.btnMinimize.Name = "btnMinimize";
            this.btnMinimize.WidthRequest = 22;
            this.btnMinimize.HeightRequest = 22;
            this.btnMinimize.CanFocus = false;
            this.hboxTitleBar.PackStart (this.btnMinimize, false, false, 0);

            this.btnMaximize = new Gtk.Button ();
            this.btnMaximize.Name = "btnMaximize";
            this.btnMaximize.WidthRequest = 22;
            this.btnMaximize.HeightRequest = 22;
            this.btnMaximize.CanFocus = false;
            this.hboxTitleBar.PackStart (this.btnMaximize, false, false, 0);

            this.btnClose = new Gtk.Button ();
            this.btnClose.Name = "btnClose";
            this.btnClose.WidthRequest = 22;
            this.btnClose.HeightRequest = 22;
            this.btnClose.CanFocus = false;
            this.hboxTitleBar.PackStart (this.btnClose, false, false, 0);

            this.btnMinimize.Image = new Gtk.Image(Assembly.GetExecutingAssembly(), ThemeHelper.minimizeBtnId);
            this.btnMinimize.SetAlignment(0.5f, 0.5f);
            this.btnMaximize.Image = new Gtk.Image(Assembly.GetExecutingAssembly(), ThemeHelper.maximizeBtnId);
            this.btnMaximize.SetAlignment(0.5f, 0.5f);
            this.btnClose.Image = new Gtk.Image(Assembly.GetExecutingAssembly(), ThemeHelper.closeBtnId);
            this.btnClose.SetAlignment(0.5f, 0.5f);
        }
开发者ID:MagistrTot,项目名称:DGLE,代码行数:55,代码来源:CustomWindowBuild.cs

示例13: createGui

        public void createGui()
        {
            basedir_section=new Section("cuesheets-basedir","CueSheet Music Directory:",20);
            source_page.Add (basedir_section);

            string dir=_source.getCueSheetDir();
            Gtk.Label lbl=new Gtk.Label("CueSheet Music Directory:");
            Gtk.FileChooserButton btn=new Gtk.FileChooserButton("CueSheet Music Directory:",Gtk.FileChooserAction.SelectFolder);
            if (dir!=null) {
                btn.SelectFilename (dir);
            }
            Gtk.HBox box=new Gtk.HBox();
            box.Add (lbl);
            box.Add (btn);
            box.ShowAll ();
            btn.CurrentFolderChanged+=delegate(object sender,EventArgs args) {
                string dir1=btn.Filename;
                Hyena.Log.Information ("Folder changed to = "+dir1);
            };
            btn.FileSet+=delegate(object sender,EventArgs args) {
                string dir1=btn.Filename;
                Hyena.Log.Information ("Base directory changed to = "+dir1);
                _source.setCueSheetDir(dir1);
            };

            Console.WriteLine (_source);

            Gtk.VBox vb=new Gtk.VBox();
            vb.PackStart (box,false,false,0);

            Gtk.Image icn_about=new Gtk.Image(Gtk.Stock.About,Gtk.IconSize.Button);
            Gtk.Button about=new Gtk.Button(icn_about);
            about.Clicked+=new EventHandler(handleAbout);
            Gtk.HBox hb=new Gtk.HBox();
            Gtk.Label _about=new Gtk.Label("About the CueSheet extension");
            hb.PackEnd (about,false,false,0);
            hb.PackEnd (_about,false,false,5);
            vb.PackStart (hb,false,false,0);
            Gtk.HBox hb1=new Gtk.HBox();
            Gtk.Label _info=new Gtk.Label("How to use the Cuesheet extension (opens browser)");
            Gtk.Image icn_info=new Gtk.Image(Gtk.Stock.Info,Gtk.IconSize.Button);
            Gtk.Button btn_info=new Gtk.Button(icn_info);
            btn_info.Clicked+=new EventHandler(handleInfo);
            hb1.PackEnd(btn_info,false,false,0);
            hb1.PackEnd(_info,false,false,5);
            vb.PackStart (hb1,false,false,0);

            Gtk.HBox hbX=new Gtk.HBox();
            vb.PackEnd (hbX,true,true,0);

            vb.ShowAll ();

            source_page.DisplayWidget = vb;
        }
开发者ID:nailyk,项目名称:banshee-community-extensions,代码行数:54,代码来源:CueSheetsPrefs.cs

示例14: MultipleObjectViewer

 protected MultipleObjectViewer(IBroadcaster hub, string caption)
     : base(false, 0)
 {
     _hub = hub;
     // --- first line: caption and buttons
     Gtk.HBox hbxFirstLine = new Gtk.HBox(false, 2);
     // Caption label
     Gtk.Alignment labelAlign = new Gtk.Alignment(0F, 0F, 1F, 1F);
     labelAlign.Add(new Gtk.Label(caption));
     hbxFirstLine.PackStart(labelAlign, false, false, 0);
     hbxFirstLine.PackStart(new Gtk.Label(String.Empty), true, true, 0);
     // "Add" button
     Gtk.Image image = new Gtk.Image();
     image.Stock = Gtk.Stock.Add;
     _btnAdd = new Gtk.Button();
     _btnAdd.Add(image);
     _btnAdd.Relief = Gtk.ReliefStyle.None;
     _btnAdd.Clicked += new EventHandler(OnAddButtonClicked);
     _btnAdd.Sensitive = false;
     hbxFirstLine.PackStart(_btnAdd, false, false, 0);
     // "Edit" button
     image = new Gtk.Image();
     image.Stock = Gtk.Stock.JumpTo;
     _btnEdit = new Gtk.Button();
     _btnEdit.Add(image);
     _btnEdit.Relief = Gtk.ReliefStyle.None;
     _btnEdit.Clicked += new EventHandler(OnEditButtonClicked);
     _btnEdit.Sensitive = false;
     hbxFirstLine.PackStart(_btnEdit, false, false, 0);
     // "Delete" button
     image = new Gtk.Image();
     image.Stock = Gtk.Stock.Remove;
     _btnDelete = new Gtk.Button();
     _btnDelete.Add(image);
     _btnDelete.Relief = Gtk.ReliefStyle.None;
     _btnDelete.Clicked += new EventHandler(OnDeleteButtonClicked);
     _btnDelete.Sensitive = false;
     hbxFirstLine.PackStart(_btnDelete, false, false, 0);
     base.PackStart(hbxFirstLine, false, false, 0);
     // --- second line: element list
     _store = new Gtk.TreeStore(typeof(string));
     _tvList = new Gtk.TreeView();
     _tvList.HeadersVisible = false;
     _tvList.AppendColumn("", new Gtk.CellRendererText(), "text", 0);
     _tvList.Model = _store;
     _tvList.FocusInEvent += new Gtk.FocusInEventHandler(EnableButtons);
     _tvList.ButtonPressEvent += new Gtk.ButtonPressEventHandler(ListClickedHandler);
     Gtk.ScrolledWindow sw = new Gtk.ScrolledWindow();
     sw.ShadowType = Gtk.ShadowType.In;
     sw.Add(_tvList);
     base.PackStart(sw, true, true, 0);
     sw.Show();
 }
开发者ID:MonoBrasil,项目名称:historico,代码行数:53,代码来源:MultipleObjectViewer.cs

示例15: CreateCellRenderer

 public static Gtk.Widget CreateCellRenderer(ICollection<CellView> views)
 {
     if (views.Count == 1) {
         Gtk.HBox box = new Gtk.HBox ();
         foreach (var v in views)
             box.PackStart (CreateCellRenderer (v), false, false, 0);
         box.ShowAll ();
         return box;
     }
     else
         return CreateCellRenderer (views.First ());
 }
开发者ID:RevolutionSmythe,项目名称:xwt,代码行数:12,代码来源:CellUtil.cs


注:本文中的Gtk.HBox类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。