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


C# VBox.PackStart方法代码示例

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


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

示例1: set_categories

        public void set_categories(List<Category> categories)
        {
            box = new Gtk.VBox();

            bool first = true;
            foreach (Category cat in categories)
            {
                CategoryDrawer c = new CategoryDrawer(cat);
                c.add_new_category_to_ui_callback = add_new_category;
                c.remove_category_callback = remove_category;
                category_drawers.Add(c);

                if (!first)
                    box.PackStart(new Gtk.HSeparator(), false, false, 5);
                else
                    first = false;

                box.PackStart(c.representation, false, false, 0);
            }

            foreach (Widget w in outer_event_box.Children)
                w.Destroy();

            outer_event_box.Add(box);

            outer_event_box.ShowAll();
        }
开发者ID:GNOME,项目名称:nemo,代码行数:27,代码来源:CategoriesDrawer.cs

示例2: DockItemContainer

		public DockItemContainer (DockFrame frame, DockItem item)
		{
			this.item = item;

			mainBox = new VBox ();
			Add (mainBox);

			mainBox.ResizeMode = Gtk.ResizeMode.Queue;
			mainBox.Spacing = 0;
			
			ShowAll ();
			
			mainBox.PackStart (item.GetToolbar (PositionType.Top).Container, false, false, 0);
			
			HBox hbox = new HBox ();
			hbox.Show ();
			hbox.PackStart (item.GetToolbar (PositionType.Left).Container, false, false, 0);
			
			contentBox = new HBox ();
			contentBox.Show ();
			hbox.PackStart (contentBox, true, true, 0);
			
			hbox.PackStart (item.GetToolbar (PositionType.Right).Container, false, false, 0);
			
			mainBox.PackStart (hbox, true, true, 0);
			
			mainBox.PackStart (item.GetToolbar (PositionType.Bottom).Container, false, false, 0);
		}
开发者ID:wickedshimmy,项目名称:monodevelop,代码行数:28,代码来源:DockItemContainer.cs

示例3: CanvasExample

		public CanvasExample () {
			Gtk.Window win = new Gtk.Window ("Canvas example");
			win.DeleteEvent += new DeleteEventHandler (Window_Delete);

			VBox vbox = new VBox (false, 0);
			win.Add (vbox);

			vbox.PackStart (new Label ("Drag - move object.\n" +
						   "Double click - change color\n" +
						   "Right click - delete object"),
					false, false, 0);
			
			canvas = new Canvas ();
			canvas.SetSizeRequest (width, height);
			canvas.SetScrollRegion (0.0, 0.0, (double) width, (double) height);
			vbox.PackStart (canvas, false, false, 0);

			HBox hbox = new HBox (false, 0);
			vbox.PackStart (hbox, false, false, 0);

			Button add_button = new Button ("Add an object");
			add_button.Clicked += new EventHandler (AddObject);
			hbox.PackStart (add_button, false, false, 0);

			Button quit_button = new Button ("Quit");
			quit_button.Clicked += new EventHandler (Quit);
			hbox.PackStart (quit_button, false, false, 0);

			win.ShowAll ();
		}
开发者ID:directhex,项目名称:xamarin-gnome-sharp2,代码行数:30,代码来源:CanvasExample.cs

示例4: SetupWindow

        public SetupWindow()
            : base("SparkleShare Setup")
        {
            SetWmclass ("SparkleShare", "SparkleShare");

            IconName       = "org.sparkleshare.SparkleShare";
            Resizable      = false;
            WindowPosition = WindowPosition.CenterAlways;
            Deletable      = false;
            TypeHint       = Gdk.WindowTypeHint.Dialog;

            SetSizeRequest (400, 400);

            DeleteEvent += delegate (object sender, DeleteEventArgs args) { args.RetVal = true; };

                VBox layout_vertical = new VBox (false, 16);
            layout_vertical.BorderWidth = 16;

                    this.content_area    = new EventBox ();
                    this.option_area = new EventBox ();

                    this.buttons = CreateButtonBox ();

                HBox layout_actions = new HBox (false , 16);

                layout_actions.PackStart (this.option_area, true, true, 0);
                layout_actions.PackStart (this.buttons, false, false, 0);

                layout_vertical.PackStart (this.content_area, true, true, 0);
                layout_vertical.PackStart (layout_actions, false, false, 0);

            base.Add (layout_vertical);
        }
开发者ID:Rud5G,项目名称:SparkleShare,代码行数:33,代码来源:SetupWindow.cs

示例5: DemoTreeStore

		public DemoTreeStore () : base ("Card planning sheet")
		{
			VBox vbox = new VBox (false, 8);
			vbox.BorderWidth = 8;
			Add (vbox);

			vbox.PackStart (new Label ("Jonathan's Holiday Card Planning Sheet"),
					false, false, 0);

			ScrolledWindow sw = new ScrolledWindow ();
			sw.ShadowType = ShadowType.EtchedIn;
			sw.SetPolicy (PolicyType.Automatic, PolicyType.Automatic);
			vbox.PackStart (sw, true, true, 0);

			// create model
			CreateModel ();

			// create tree view
			TreeView treeView = new TreeView (store);
			treeView.RulesHint = true;
			treeView.Selection.Mode = SelectionMode.Multiple;
			AddColumns (treeView);

			sw.Add (treeView);

			// expand all rows after the treeview widget has been realized
			treeView.Realized += new EventHandler (ExpandRows);

			SetDefaultSize (650, 400);
			ShowAll ();
		}
开发者ID:arkydon,项目名称:gtk-sharp,代码行数:31,代码来源:DemoTreeStore.cs

示例6: SparkleWindow

        public SparkleWindow()
            : base("")
        {
            BorderWidth    = 0;
            IconName       = "folder-sparkleshare";
            Resizable      = true;
            WindowPosition = WindowPosition.Center;

            SetDefaultSize (640, 480);

            Buttons = CreateButtonBox ();

            HBox = new HBox (false, 6);

                string image_path = SparkleHelpers.CombineMore (Defines.DATAROOTDIR, "sparkleshare",
                    "pixmaps", "side-splash.png");

                Image side_splash = new Image (image_path);

                VBox = new VBox (false, 0);

                    Wrapper = new VBox (false, 0) {
                        BorderWidth = 30
                    };

                VBox.PackStart (Wrapper, true, true, 0);
                VBox.PackStart (Buttons, false, false, 0);

            HBox.PackStart (side_splash, false, false, 0);
            HBox.PackStart (VBox, true, true, 0);

            base.Add (HBox);
        }
开发者ID:kristi,项目名称:SparkleShare,代码行数:33,代码来源:SparkleWindow.cs

示例7: DockFrame

		public DockFrame ()
		{
			shadedContainer = new ShadedContainer ();
			
			dockBarTop = new DockBar (this, Gtk.PositionType.Top);
			dockBarBottom = new DockBar (this, Gtk.PositionType.Bottom);
			dockBarLeft = new DockBar (this, Gtk.PositionType.Left);
			dockBarRight = new DockBar (this, Gtk.PositionType.Right);
			
			container = new DockContainer (this);
			HBox hbox = new HBox ();
			hbox.PackStart (dockBarLeft, false, false, 0);
			hbox.PackStart (container, true, true, 0);
			hbox.PackStart (dockBarRight, false, false, 0);
			mainBox = new VBox ();
			mainBox.PackStart (dockBarTop, false, false, 0);
			mainBox.PackStart (hbox, true, true, 0);
			mainBox.PackStart (dockBarBottom, false, false, 0);
			Add (mainBox);
			mainBox.ShowAll ();
			mainBox.NoShowAll = true;
			CompactGuiLevel = 2;
			dockBarTop.UpdateVisibility ();
			dockBarBottom.UpdateVisibility ();
			dockBarLeft.UpdateVisibility ();
			dockBarRight.UpdateVisibility ();
		}
开发者ID:nieve,项目名称:monodevelop,代码行数:27,代码来源:DockFrame.cs

示例8: NotificationMessage

		public NotificationMessage (string t, string m) : base (false, 5)
		{
			this.Style = style;

			BorderWidth = 5;

			icon = new Image (Stock.DialogInfo, IconSize.Dialog);
			this.PackStart (icon, false, true, 5);

			VBox vbox = new VBox (false, 5);
			this.PackStart (vbox, true, true, 0);

			title = new Label ();
			title.SetAlignment (0.0f, 0.5f);
			this.Title = t;
			vbox.PackStart (title, false, true, 0);

			message = new Label ();
			message.LineWrap = true;
			message.SetSizeRequest (500, -1); // ugh, no way to sanely reflow a gtk label
			message.SetAlignment (0.0f, 0.0f);
			this.Message = m;			
			vbox.PackStart (message, true, true, 0);

			action_box = new HBox (false, 3);

			Button hide_button = new Button (Catalog.GetString ("Hide"));
			hide_button.Clicked += OnHideClicked;
			action_box.PackEnd (hide_button, false, true, 0);

			Alignment action_align = new Alignment (1.0f, 0.5f, 0.0f, 0.0f);
			action_align.Add (action_box);
			vbox.PackStart (action_align, false, true, 0);
		}
开发者ID:ArsenShnurkov,项目名称:beagle-1,代码行数:34,代码来源:NotificationArea.cs

示例9: DemoEntryCompletion

		public DemoEntryCompletion () : base ("Demo Entry Completion", null, DialogFlags.DestroyWithParent)
		{
			Resizable = false;

			VBox vbox = new VBox (false, 5);
			vbox.BorderWidth = 5;
			this.VBox.PackStart (vbox, true, true, 0);

			Label label = new Label ("Completion demo, try writing <b>total</b> or <b>gnome</b> for example.");
			label.UseMarkup = true;
			vbox.PackStart (label, false, true, 0);

			Entry entry = new Entry ();
			vbox.PackStart (entry, false, true, 0);

			entry.Completion = new EntryCompletion ();
			entry.Completion.Model = CreateCompletionModel ();
			entry.Completion.TextColumn = 0;

			AddButton (Stock.Close, ResponseType.Close);

			ShowAll ();
			Run ();
			Destroy ();
		}
开发者ID:ystk,项目名称:debian-gtk-sharp2,代码行数:25,代码来源:DemoEntryCompletion.cs

示例10: DemoColorSelection

		public DemoColorSelection () : base ("Color Selection")
		{
			BorderWidth = 8;
			VBox vbox = new VBox (false,8);
			vbox.BorderWidth = 8;
			Add (vbox);

			// Create the color swatch area
			Frame frame = new Frame ();
			frame.ShadowType = ShadowType.In;
			vbox.PackStart (frame, true, true, 0);

			drawingArea = new DrawingArea ();
			drawingArea.ExposeEvent += new ExposeEventHandler (ExposeEventCallback);
			// set a minimum size
			drawingArea.SetSizeRequest (200,200);
			// set the color
			color = new Gdk.Color (0, 0, 0xff);
			drawingArea.ModifyBg (StateType.Normal, color);
			frame.Add (drawingArea);

			Alignment alignment = new Alignment (1.0f, 0.5f, 0.0f, 0.0f);
			Button button = new Button ("_Change the above color");
			button.Clicked += new EventHandler (ChangeColorCallback);
			alignment.Add (button);
			vbox.PackStart (alignment);

			ShowAll ();
		}
开发者ID:ystk,项目名称:debian-gtk-sharp2,代码行数:29,代码来源:DemoColorSelection.cs

示例11: GetToken

        public void GetToken()
        {
            window = new Gtk.Window ("packingdemo");
            window.Title = "CircleCi Indicator Configuration";
            window.WindowPosition = WindowPosition.Center;

            HBox hbox = new HBox ();

            VBox vbox = new VBox (false, 0);

            Label label = new Label ();
            label.Markup = "Please provide your CircleCi token.\nYou can get one <a href=\"https://circleci.com/account/api\">here</a>.";

            entry = new Entry ();

            Button okButton = new Button ("OK");

            vbox.PackStart (label, false, false, 20);
            vbox.PackStart (entry, false, false, 0);
            vbox.PackStart (okButton, false, false, 20);

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

            window.Add(hbox);

            entry.KeyReleaseEvent += HandleKeyReleaseEvent;
            okButton.Clicked += HandleClicked;;

            window.ShowAll ();
        }
开发者ID:rossille,项目名称:circleci-notification,代码行数:30,代码来源:TokenInput.cs

示例12: MainWindow

		public MainWindow()
			: base (Gtk.WindowType.Toplevel)
		{
			Title = "Gtk Test Application";
			WidthRequest = 500;
			HeightRequest = 400;

			var box = new VBox ();
			var comboBoxDialogButton = new Button ("Show Combo Box Dialog");
			comboBoxDialogButton.Clicked += ComboBoxDialogButtonClicked;
			box.PackStart (comboBoxDialogButton, false, false, 0);

			var listViewDialogButton = new Button ("Show ListView Box Dialog");
			listViewDialogButton.Clicked += ListViewDialogButtonClicked;
			box.PackStart (listViewDialogButton, false, false, 0);

			var sortFuncListViewDialogButton = new Button ("Show SortFunc ListView Box Dialog");
			sortFuncListViewDialogButton.Clicked += SortFuncListViewDialogButtonClicked;
			box.PackStart (sortFuncListViewDialogButton, false, false, 0);

			var scrolledWindowDialogButton = new Button ("Show ScrolledWindow Dialog");
			scrolledWindowDialogButton.Clicked += ScrolledWindowDialogButtonClicked;
			box.PackStart (scrolledWindowDialogButton, false, false, 0);

			DeleteEvent += OnDeleteEvent;

			Add (box);
			ShowAll ();
		}
开发者ID:mrward,项目名称:test-xwt-memory-leak,代码行数:29,代码来源:MainWindow.cs

示例13: Graphics

 // constructor that show the graphic interface to users
 public Graphics(Game g)
     : base(Gtk.WindowType.Toplevel)
 {
     Build ();
       int scale = 10;
       if (Screen.Height < 1000)
     scale = 5;
       this.game = g;
       VBox gridWrapper = new VBox ();
       HBox box = new HBox ();
       this.status = new Label ("");
       this.chooser = new Popup (this, this.game.getChooseableFigures(), handleChooser, scale);
       this.mainGrid = new GridWidget (this.game, clickHandler, scale);
       gridWrapper.PackStart (status, false, false, 0);
       gridWrapper.PackStart (this.mainGrid, false, false, 0);
       this.sidebarLeft = new SidebarWidget (g.getRemovedFigures (), "black", scale);
       box.PackStart (new HBox ());
       box.PackStart (this.sidebarLeft);
       box.PackStart (gridWrapper, false, false, 0);
       this.sidebarRight = new SidebarWidget (g.getRemovedFigures (), "white", scale);
       box.PackEnd (this.sidebarRight);
       box.PackStart (new HBox ());
       box.ShowAll ();
       this.Add (box);
       updateGui (this.game.initialState ());
       this.Show ();
 }
开发者ID:jsparber,项目名称:chess,代码行数:28,代码来源:Graphics.cs

示例14: Dialog

        public Dialog(Image image, Drawable drawable, SliceData sliceData)
            : base(_("Slice Tool"), _("SliceTool"), 
	   IntPtr.Zero, 0, null, _("SliceTool"),
	   Stock.SaveAs, (Gtk.ResponseType) 2,
	   Stock.Save, (Gtk.ResponseType) 3,
	   Stock.Close, ResponseType.Close)
        {
            _image = image;
              _drawable = drawable;
              _sliceData = sliceData;

              SetTitle(null);

              var vbox = new VBox(false, 12) {BorderWidth = 12};
              VBox.PackStart(vbox, true, true, 0);

              var hbox = new HBox();
              vbox.PackStart(hbox, true, true, 0);

              var preview = CreatePreview(drawable, sliceData);
              var toolbox = Preview.CreateToolbox(sliceData);

              hbox.PackStart(toolbox, false, true, 0);
              hbox.PackStart(preview, true, true, 0);

              hbox = new HBox();
              vbox.PackStart(hbox, true, true, 0);
              hbox.PackStart(new CoordinatesDisplay(Preview), false, false, 0);

              hbox = new HBox(false, 24);
              vbox.PackStart(hbox, true, true, 0);

              var properties = new CellPropertiesFrame(sliceData.Rectangles);
              hbox.PackStart(properties, false, true, 0);

              vbox = new VBox(false, 12);
              hbox.PackStart(vbox, false, true, 0);

              var rollover = new RolloversFrame(sliceData);
              vbox.PackStart(rollover, false, true, 0);

              _format = new Format(sliceData.Rectangles);
              _format.Extension = System.IO.Path.GetExtension(image.Name).ToLower();
              vbox.PackStart(_format, false, true, 0);

              vbox = new VBox(false, 12);
              hbox.PackStart(vbox, false, true, 0);

              var save = new SaveSettingsButton(this, sliceData);
              vbox.PackStart(save, false, true, 0);

              var load = new LoadSettingsButton(this, sliceData);
              vbox.PackStart(load, false, true, 0);

              var preferences = new PreferencesButton(_("Preferences"), Preview);
              vbox.PackStart(preferences, false, true, 0);

              sliceData.Rectangles.SelectedRectangleChanged += delegate {Redraw();};
              sliceData.Init(drawable);
        }
开发者ID:unhammer,项目名称:gimp-sharp,代码行数:60,代码来源:Dialog.cs

示例15: initGui

        private void initGui()
        {
            //create the layout
            VBox layout       = new VBox();
            //add the list
            ScrolledWindow sw = new ScrolledWindow();
            sw.AddWithViewport( list );
            layout.PackStart  ( sw   );
            //add the add/edit/remove buttons
            HBox hbox = new HBox();
            hbox.PackStart  ( BtnAdd    );
            hbox.PackStart  ( BtnEdit   );
            hbox.PackStart  ( BtnRemove );
            hbox.PackStart  ( BtnSort   );
            layout.PackStart( hbox, false, true, 0 );
            //add the checkboxes
            hbox = new HBox();
            hbox.PackStart( ChkOwnerDrawned  , true, true, 0 );
            hbox.PackStart( ChkIsCheckBoxList, true, true, 0 );
            hbox.PackStart( ChkIsEditable    , true, true, 0 );
            hbox.PackStart( ChkDragAndDrop   , true, true, 0 );
            //

            layout.PackStart( hbox, false, true, 0 );
            //add layout
            this.Add( layout );
        }
开发者ID:tizianomanni,项目名称:holly-gtk-widgets,代码行数:27,代码来源:SimpleList.cs


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