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


C# Gtk.HBox.PackStart方法代码示例

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


在下文中一共展示了Gtk.HBox.PackStart方法的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: 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

示例3: 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

示例4: 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

示例5: 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

示例6: 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

示例7: Drag

		// Drag function for automatic sources, called from DragBegin
		public static void Drag (Gtk.Widget source, Gdk.DragContext ctx, WidgetDropCallback dropCallback, string label)
		{
			Gtk.Frame fr = new Gtk.Frame ();
			fr.ShadowType = Gtk.ShadowType.Out;
			Gtk.HBox box = new Gtk.HBox ();
			box.Spacing = 3;
			box.BorderWidth = 3;
			box.PackStart (new Gtk.Image (widgetIcon), false, false, 0);
			Gtk.Label lab = new Gtk.Label (label);
			lab.Xalign = 0;
			box.PackStart (lab, true, true, 0);
			fr.Add (box);
			fr.ShowAll ();
			Drag (source, ctx, dropCallback, fr);
		}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:16,代码来源:DND.cs

示例8: CreatePanelWidget

        public override Gtk.Widget CreatePanelWidget ()
        {
            Gtk.VBox box = new Gtk.VBox ();
            box.Spacing = 6;

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

            Gtk.Label label = CreateLabel ("Android studio executable location:");

            labelBox.PackStart (label, false, false, 0);

            entry = new FileEntry ();
            entry.Path = AddInPreferences.AndroidStudioLocation;


            Gtk.HBox sdkVersions = new Gtk.HBox ();
            Gtk.Label minSdkLabel = CreateLabel ("Min SDK version:");
            MinSdkEntry = new Gtk.Entry (AddInPreferences.MinSdkVersion);
            Gtk.Label targetSdkLabel = CreateLabel ("Target/Compile SDK version:");
            TargetSdkEntry = new Gtk.Entry (AddInPreferences.CompileSdkVersion);


            sdkVersions.PackStart (minSdkLabel, false, false, 0);
            sdkVersions.PackStart (MinSdkEntry, true, false, 0);
            sdkVersions.PackStart (targetSdkLabel, false, false, 0);
            sdkVersions.PackStart (TargetSdkEntry, true, false, 0);


            Gtk.HBox otherVersions = new Gtk.HBox ();
            Gtk.Label supportVersionLabel = CreateLabel ("Support library versions:");
            SupportVersionEntry = new Gtk.Entry (AddInPreferences.SupportVersion);
            Gtk.Label buildToolsVersionLabel = CreateLabel ("Build tools version:");
            BuildToolsVersionEntry = new Gtk.Entry (AddInPreferences.BuildToolsVersion);


            otherVersions.PackStart (supportVersionLabel, false, false, 0);
            otherVersions.PackStart (SupportVersionEntry, true, false, 0);
            otherVersions.PackStart (buildToolsVersionLabel, false, false, 0);
            otherVersions.PackStart (BuildToolsVersionEntry, true, false, 0);

            box.PackStart (labelBox, false, false, 0);
            box.PackStart (entry, false, false, 0);
            box.PackStart (sdkVersions, false, false, 0);
            box.PackStart (otherVersions, false, false, 0);
            box.ShowAll ();
            return box;

        }
开发者ID:taiste,项目名称:ViewInAndroidStudio,代码行数:48,代码来源:GeneralOptions.cs

示例9: CreatePanelWidget

        public override Gtk.Widget CreatePanelWidget()
        {
            var vbox = new Gtk.VBox ();
            var hbox = new Gtk.HBox ();
            var label = new Gtk.Label (GettextCatalog.GetString ("DNX Runtime Version:"));
            label.Xalign = 0;
            hbox.PackStart (label, false, false, 5);

            dnxRuntimeVersionComboBox = Gtk.ComboBox.NewText ();
            hbox.PackStart (dnxRuntimeVersionComboBox, true, true, 5);

            PopulateOptionsPanel ();

            vbox.PackStart (hbox);
            vbox.ShowAll ();
            return vbox;
        }
开发者ID:fogzot,项目名称:monodevelop-dnx-addin,代码行数:17,代码来源:DnxRuntimeOptionsPanel.cs

示例10: CreatePanelWidget

        public override Gtk.Widget CreatePanelWidget()
        {
            var vbox = new Gtk.VBox ();
            var hbox = new Gtk.HBox ();
            var label = new Gtk.Label (GettextCatalog.GetString ("DNX Output Verbosity:"));
            label.Xalign = 0;
            hbox.PackStart (label, false, false, 5);

            logLevelsComboBox = Gtk.ComboBox.NewText ();
            hbox.PackStart (logLevelsComboBox, true, true, 5);

            AddLogLevelsToComboBox ();

            vbox.PackStart (hbox, false, false, 0);
            vbox.ShowAll ();
            return vbox;
        }
开发者ID:twing207,项目名称:monodevelop-dnx-addin,代码行数:17,代码来源:DnxGlobalOptionsPanel.cs

示例11: Initialize

		void Initialize (ActionGroupDesignerFrontend frontend, Wrapper.ActionGroupCollection actionGroups, bool singleGroupMode)
		{
			this.frontend = frontend;
			this.singleGroupMode = singleGroupMode;
			IconSize = Gtk.IconSize.SmallToolbar;
			Orientation = Gtk.Orientation.Horizontal;
			ToolbarStyle = Gtk.ToolbarStyle.BothHoriz;
			
			combo = Gtk.ComboBox.NewText ();
			
			if (!singleGroupMode) {
				combo.Changed += OnActiveChanged;

				Gtk.ToolItem comboItem = new Gtk.ToolItem ();
				Gtk.HBox cbox = new Gtk.HBox ();
				cbox.PackStart (new Gtk.Label (Catalog.GetString ("Action Group:") + " "), false, false, 3);
				cbox.PackStart (combo, true, true, 3);
				comboItem.Add (cbox);
				comboItem.ShowAll ();
				Insert (comboItem, -1);
				internalButtons.Add (comboItem);
				
				addButton = new Gtk.ToolButton (Gtk.Stock.Add);
				addButton.Clicked += OnAddGroup;
				Insert (addButton, -1);
				internalButtons.Add (addButton);
				
				removeButton = new Gtk.ToolButton (Gtk.Stock.Remove);
				removeButton.Clicked += OnRemoveGroup;
				Insert (removeButton, -1);
				internalButtons.Add (removeButton);
				
				ActionGroups = actionGroups;
				
				if (actionGroups != null && actionGroups.Count > 0)
					combo.Active = 0;
			} else {
				UpdateActionCommands (null);
			}

			ShowAll ();
		}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:42,代码来源:ActionGroupToolbar.cs

示例12: 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

示例13: NoteMenuItem

		public NoteMenuItem (Note note, bool show_pin)
			: base (GetDisplayName(note))
		{
			this.note = note;
			Image = new Gtk.Image (note_icon);
#if HAS_GTK_2_16
			this.SetAlwaysShowImage (true);
#endif
			if (show_pin) {
				Gtk.HBox box = new Gtk.HBox (false, 0);
				Gtk.Widget child = Child;
				Remove (child);
				box.PackStart (child, true, true, 0);
				Add (box);
				box.Show();

				pinned = note.IsPinned;
				pin_img = new Gtk.Image(pinned ? pindown : pinup);
				pin_img.Show();
				box.PackStart (pin_img, false, false, 0);
			}
		}
开发者ID:MichaelAquilina,项目名称:tomboy,代码行数:22,代码来源:Tray.cs

示例14: MessageDialog

		public MessageDialog ()
		{
			Resizable = false;
			HasSeparator = false;
			BorderWidth = 12;

			label = new Gtk.Label ();
			label.LineWrap = true;
			label.Selectable = true;
			label.UseMarkup = true;
			label.SetAlignment (0.0f, 0.0f);

			secondaryLabel = new Gtk.Label ();
			secondaryLabel.LineWrap = true;
			secondaryLabel.Selectable = true;
			secondaryLabel.UseMarkup = true;
			secondaryLabel.SetAlignment (0.0f, 0.0f);

			icon = new Gtk.Image (Gtk.Stock.DialogInfo, Gtk.IconSize.Dialog);
			icon.SetAlignment (0.5f, 0.0f);

			Gtk.StockItem item = Gtk.Stock.Lookup (icon.Stock);
			Title = item.Label;

			Gtk.HBox hbox = new Gtk.HBox (false, 12);
			Gtk.VBox vbox = new Gtk.VBox (false, 12);

			vbox.PackStart (label, false, false, 0);
			vbox.PackStart (secondaryLabel, true, true, 0);

			hbox.PackStart (icon, false, false, 0);
			hbox.PackStart (vbox, true, true, 0);

			VBox.PackStart (hbox, false, false, 0);
			hbox.ShowAll ();

			Buttons = Gtk.ButtonsType.OkCancel;
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:38,代码来源:MessageDialog.cs

示例15: CreatePanelWidget

		public override Control CreatePanelWidget()
		{
			var vbox = new Gtk.VBox();
			vbox.Spacing = 6;

			var generalSectionLabel = new Gtk.Label("<b>" + GettextCatalog.GetString("General") + "</b>");
			generalSectionLabel.UseMarkup = true;
			generalSectionLabel.Xalign = 0;
			vbox.PackStart(generalSectionLabel, false, false, 0);

			var outputDirectoryHBox = new Gtk.HBox();
			outputDirectoryHBox.BorderWidth = 10;
			outputDirectoryHBox.Spacing = 6;
			var outputDirectoryLabel = new Gtk.Label(GettextCatalog.GetString("Output directory:"));
			outputDirectoryLabel.Xalign = 0;
			outputDirectoryHBox.PackStart(outputDirectoryLabel, false, false, 0);
			folderEntry.Path = Options.OutputPath.Value;
			outputDirectoryHBox.PackStart(folderEntry, true, true, 0);

			vbox.PackStart(outputDirectoryHBox, false, false, 0);
			vbox.ShowAll();
			return vbox;
		}
开发者ID:sushihangover,项目名称:monodevelop,代码行数:23,代码来源:GlobalOptionsDialog.cs


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