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


C# HBox.PackStart方法代码示例

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


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

示例1: BuildWidget

        private void BuildWidget ()
        {
            sleepHour = new SpinButton (0,23,1);
            sleepMin  = new SpinButton (0,59,1);

            sleepHour.WidthChars = 2;
            sleepMin.WidthChars  = 2;

            int remainder = 0;
            sleepHour.Value = Math.DivRem (service.SleepTimerDuration, 60, out remainder);
            sleepMin.Value = remainder;

            sleepHour.ValueChanged += OnSleepValueChanged;
            sleepMin.ValueChanged += OnSleepValueChanged;

            Label prefix    = new Label (AddinManager.CurrentLocalizer.GetString ("Sleep Timer :"));
            Label separator = new Label (":");

            HBox topbox     = new HBox (false, 10);

            topbox.PackStart (prefix);
            topbox.PackStart (sleepHour);
            topbox.PackStart (separator);
            topbox.PackStart (sleepMin);

            AddStockButton (Stock.Cancel, ResponseType.Cancel);
            start_button = AddButton (AddinManager.CurrentLocalizer.GetString ("Start Timer"), ResponseType.Ok, true);

            VBox.PackStart (topbox);

            Update ();
        }
开发者ID:h0rm,项目名称:No.Noise,代码行数:32,代码来源:SleepTimerConfigDialog.cs

示例2: ShowLogFileButton

	private void ShowLogFileButton(){
		HBox box = new HBox();
        box.PackStart(logFileButImage, true, true, 0);
        box.PackStart(logFileButLabel, true, true, 0);
        setSensorLogNameButton.Add(box);
		setSensorLogNameButton.ShowAll();	
	}
开发者ID:seipekm,项目名称:MonoBrick-Communication-Software,代码行数:7,代码来源:SensorPage.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: ParameterInformationWindow

        public ParameterInformationWindow()
        {
            desc = new Gtk.Label ("");
            desc.Xalign = 0;
            desc.Wrap = true;
            count = new Gtk.Label ("");

            mainBox = new HBox (false, 2);
            mainBox.BorderWidth = 3;

            HBox arrowHBox = new HBox ();

            goPrev = new Gtk.Arrow (Gtk.ArrowType.Up, ShadowType.None);
            arrowHBox.PackStart (goPrev, false, false, 0);
            arrowHBox.PackStart (count, false, false, 0);
            goNext = new Gtk.Arrow (Gtk.ArrowType.Down, ShadowType.None);
            arrowHBox.PackStart (goNext, false, false, 0);

            VBox vBox = new VBox ();
            vBox.PackStart (arrowHBox, false, false, 0);

            mainBox.PackStart (vBox, false, false, 0);
            mainBox.PackStart (desc, true, true, 0);
            mainBox.ShowAll ();
            this.Add (mainBox);

            EnableTransparencyControl = true;
        }
开发者ID:moscrif,项目名称:ide,代码行数:28,代码来源:ParameterInformationWindow.cs

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

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

示例7: AddMessage

		public void AddMessage (string msg, IconId icon)
		{
			if (lastImage != null) {
				HSeparator sep = new HSeparator ();
				sep.Show ();
				msgBox.PackStart (sep, false, false, 0);
				lastImage.IconSize = Gtk.IconSize.Menu;
			}
			
			HBox box = new HBox ();
			box.Spacing = 12;
			Alignment imgBox = new Alignment (0, 0, 0, 0);
			var img = new ImageView (icon, lastImage != null ? Gtk.IconSize.Menu : IconSize.Dialog);
			imgBox.Add (img);
			lastImage = img;
			box.PackStart (imgBox, false, false, 0);
			Label lab = new Label (msg);
			lab.UseUnderline = false;
			lab.Xalign = 0;
			lab.Yalign = 0;
			lab.Wrap = true;
			lab.WidthRequest = 500;
			box.PackStart (lab, true, true, 0);
			msgBox.PackStart (box, false, false, 0);
			box.ShowAll ();
		}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:26,代码来源:MultiMessageDialog.cs

示例8: Viewer

    /// <summary>
    /// Constructs the sprite drawing area, along with the various
    /// rules needed.
    /// </summary>
    public Viewer()
    {
        // Create the drop-down list
        HBox box = new HBox();
        fps = new SpinButton(1, 100, 1);
        fps.Value = DesiredFps;
        fps.Changed += OnFpsChanged;
        showUpdate = new CheckButton();
        box.PackStart(new Label("FPS"), false, false, 0);
        box.PackStart(fps, false, false, 2);
        box.PackStart(new Label("Show Update"), false, false, 5);
        box.PackStart(showUpdate, false, false, 2);
        box.PackStart(new Label(), true, true, 0);
        PackStart(box, false, false, 2);

        // Create the drawing area and pack it
        area = new DrawingArea();
        area.Realized += OnRealized;
        area.ExposeEvent += OnExposed;
        area.ConfigureEvent += OnConfigure;
        PackStart(area, true, true, 2);

        // Create the viewport
        Sprites = new SpriteList();
        viewport = new SpriteViewport(Sprites);

        // Start up a little animation loop
        Timeout.Add(1000 / DesiredFps, OnTick);
    }
开发者ID:dmoonfire,项目名称:wordplay,代码行数:33,代码来源:Viewer.cs

示例9: PasswordWindow

        public PasswordWindow()
            : base(WindowType.Toplevel)
        {
            Password = null;
            Cancelled = true;

            box = new HBox(true, 3);

            label = new Label("Wachtwoord:");
            box.PackStart(label);

            TextTagTable textTagTable = new TextTagTable();
            passwordField = new TextView(new TextBuffer(new TextTagTable()));
            box.PackStart(passwordField);

            button = new Button();
            button.Label = "Ok";
            button.Clicked += delegate {
                Password = passwordField.Buffer.Text;
                Cancelled = false;
                Hide();
            };
            box.PackStart(button);

            Add(box);
            ShowAll();
        }
开发者ID:reinkrul,项目名称:SailorsTabDotNet,代码行数:27,代码来源:PasswordWindow.cs

示例10: Category

		public Category (Tiles.TileGroupInfo info, int columns)
		{
			WidgetFlags |= WidgetFlags.NoWindow;

			header = new Gtk.HBox (false, 0);

			headerExpander = new Gtk.Expander ("<big><b>" + GLib.Markup.EscapeText (info.Name) + "</b></big>");
			((Gtk.Label) headerExpander.LabelWidget).SetAlignment (0.0f, 0.5f);
			headerExpander.UseMarkup = true;
			headerExpander.UseUnderline = true;
			headerExpander.Show ();
			header.PackStart (headerExpander, true, true, 0);

			headerExpander.Activated += OnActivated;
			
			scope = Tiles.Utils.TileGroupToScopeType(info.Group);
			
			position = new Gtk.Label ();
			position.ModifyFg (Gtk.StateType.Normal, position.Style.Base (Gtk.StateType.Selected));
			header.PackStart (position, false, false, 0);
			position.Show ();

			prev = MakeButton (header, Gtk.Stock.GoBack, OnPrev);
			next = MakeButton (header, Gtk.Stock.GoForward, OnNext);

			header.Show ();
			header.Parent = this;
			header.SizeRequested += HeaderSizeRequested;

			tiles = new SortedTileList (Beagle.Search.SortType.Relevance);
			Columns = columns;

			UpdateButtons ();
			Expanded = true;	
		}
开发者ID:ArsenShnurkov,项目名称:beagle-1,代码行数:35,代码来源:Category.cs

示例11: AddMessage

		public void AddMessage (string msg, string icon)
		{
			if (lastImage != null) {
				HSeparator sep = new HSeparator ();
				sep.Show ();
				msgBox.PackStart (sep);
				lastImage.IconSize = (int) Gtk.IconSize.Button;
			}
			
			HBox box = new HBox ();
			box.Spacing = 12;
			Alignment imgBox = new Alignment (0, 0, 0, 0);
			Image img = new Image (icon, lastImage != null ? Gtk.IconSize.Button : IconSize.Dialog);
			imgBox.Add (img);
			lastImage = img;
			box.PackStart (imgBox, false, false, 0);
			Label lab = new Label (msg);
			lab.Xalign = 0;
			lab.Yalign = 0;
			lab.Wrap = true;
			lab.WidthRequest = 500;
			box.PackStart (lab, true, true, 0);
			msgBox.PackStart (box, false, false, 0);
			box.ShowAll ();
		}
开发者ID:Tak,项目名称:monodevelop-novell,代码行数:25,代码来源:MultiMessageDialog.cs

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

示例13: QueryBox

        public QueryBox (Client app)
        {
            this.app = app;
            AppPaintable = true;

            hbox = new HBox () { BorderWidth = 6 };

            Entry = new Gtk.Entry () { WidthChars = 40 };
            Entry.Activated += OnActivated;

            var query_button = new Hyena.Widgets.ImageButton (Catalog.GetString ("Select Matching"), Gtk.Stock.Find);
            query_button.Clicked += OnActivated;

            var close_button = new Hyena.Widgets.ImageButton (null, Gtk.Stock.Close);
            close_button.Clicked += delegate {
                Hide ();
            };

            hbox.PackStart (Entry, true, true, 0);
            hbox.PackStart (query_button, false, false, 0);
            hbox.PackStart (close_button, false, false, 0);
            Child = hbox;

            KeyPressEvent += delegate (object o, KeyPressEventArgs args) {
                if (args.Event.Key == Gdk.Key.Escape) {
                    Hide ();
                }
            };

            ShowAll ();
        }
开发者ID:GNOME,项目名称:pdfmod,代码行数:31,代码来源:SelectMatchingBox.cs

示例14: Build

        private void Build ()
        {
            // Section label + line
            var hbox1 = new HBox (false, 6);

            var label = new Label ();
            label.LabelProp = Mono.Unix.Catalog.GetString ("Random Noise");

            hbox1.PackStart (label, false, false, 0);
            hbox1.PackStart (new HSeparator (), true, true, 0);

            // Reseed button
            button1 = new Button ();
            button1.WidthRequest = 88;
            button1.CanFocus = true;
            button1.UseUnderline = true;
            button1.Label = Mono.Unix.Catalog.GetString ("Reseed");

            var hbox2 = new HBox (false, 6);
            hbox2.PackStart (button1, false, false, 0);

            // Main layout
            var vbox = new VBox (false, 6);

            vbox.Add (hbox1);
            vbox.Add (hbox2);

            Add (vbox);

            vbox.ShowAll ();
        }
开发者ID:msiyer,项目名称:Pinta,代码行数:31,代码来源:ReseedButtonWidget.cs

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


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