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


C# Notebook.SetSizeRequest方法代码示例

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


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

示例1: CommonAboutDialog

        public CommonAboutDialog()
        {
            this.Title = GettextCatalog.GetString ("About MonoDevelop");
            this.TransientFor = (Gtk.Window) WorkbenchSingleton.Workbench;
            aboutPictureScrollBox = new ScrollBox ();

            this.VBox.PackStart (aboutPictureScrollBox, false, false, 0);

            Notebook nb = new Notebook ();
            nb.SetSizeRequest (400, 280);
            VersionInformationTabPage vinfo = new VersionInformationTabPage ();

            nb.AppendPage (new AboutMonoDevelopTabPage (), new Label (GettextCatalog.GetString ("About MonoDevelop")));

            nb.AppendPage (vinfo, new Label (GettextCatalog.GetString ("Version Info")));
            this.VBox.PackStart (nb, true, true, 0);
            this.AddButton (Gtk.Stock.Close, (int) ResponseType.Close);
            this.ShowAll ();
        }
开发者ID:slluis,项目名称:monodevelop-prehistoric,代码行数:19,代码来源:CommonAboutDialog.cs

示例2: InitializeComponent

        private void InitializeComponent()
        {
            if (Common.IsWindows)
             {
            this.Title = "Options";
            this.AddButton(Stock.Ok, Gtk.ResponseType.Ok);
            this.AddButton(Stock.Cancel, Gtk.ResponseType.Cancel);
             }
             else
             {
            this.Title = Stock.Lookup(Stock.Preferences).Label.Replace("_", "");
            this.AddButton(Stock.Cancel, Gtk.ResponseType.Cancel);
            this.AddButton(Stock.Ok, Gtk.ResponseType.Ok);
             }

             this.Modal = true;
             this.WindowPosition = Gtk.WindowPosition.CenterOnParent;
             this.Resizable = false;
             this.SetDefaultSize(518, 399);
             this.Response += new ResponseHandler(frmOptions_Response);
             this.IconName = Stock.Preferences;

             optionTabs = new Notebook();
             optionTabs.ShowTabs = true;
             optionTabs.BorderWidth = 5;
             optionTabs.TabPos = PositionType.Top;
             optionTabs.SetSizeRequest(515, 300);

             GenerateTabs();

             this.VBox.PackStart(optionTabs, true, true, 0);
             this.VBox.ShowAll();

             LoadSettings();
        }
开发者ID:joshball,项目名称:astrogrep,代码行数:35,代码来源:frmOptions.cs

示例3: CreateGui

        private void CreateGui(
			string programName,
			Dedication dedication)
        {
            // Create the title and version labels.
            var programLabel = new Label
            {
                Markup = "<b><span size='100'>" + programName + "</span></b>"
            };
            var versionLabel = new Label
            {
                Markup = "<b><span size='80'>" + dedication.Version + "</span></b>"
            };
            var authorLabel = new Label
            {
                Markup = "<b><span size='80'>" + dedication.Author + "</span></b>"
            };

            // Set up the dedication text.
            string html = string.Join("\n", dedication.Lines);
            string text = html + "- " + dedication.Dedicator;

            // Create an HTML display widget with the text.
            var dedicationView = new TextView
            {
                Buffer =
                {
                    Text = text
                },
                WrapMode = WrapMode.Word,
                PixelsBelowLines = 10,
                RightMargin = 8,
                LeftMargin = 4,
                Justification = Justification.Fill,
                Sensitive = false,
            };

            var dedicatorTag = new TextTag("dedicator");
            dedicatorTag.Style = Pango.Style.Italic;
            dedicatorTag.Justification = Justification.Right;
            dedicationView.Buffer.TagTable.Add(dedicatorTag);

            TextIter dedicatorIterBegin =
                dedicationView.Buffer.GetIterAtOffset(html.Length);
            TextIter dedicatorIterEnd = dedicationView.Buffer.GetIterAtOffset(
                text.Length);
            dedicationView.Buffer.ApplyTag(
                dedicatorTag, dedicatorIterBegin, dedicatorIterEnd);

            // Wrap it in a scroll window with some additional spacing.
            var dedicationScroll = new ScrolledWindow
            {
                BorderWidth = 4
            };
            dedicationScroll.Add(dedicationView);

            // Create the notebook we'll be using for the larger text tabs.
            var notebook = new Notebook();
            notebook.SetSizeRequest(512, 256);
            notebook.BorderWidth = 4;

            notebook.AppendPage(dedicationScroll, new Label("Dedication"));

            // Arrange everything in the vertical box.
            VBox.PackStart(programLabel, false, false, 4);
            VBox.PackStart(versionLabel, false, false, 4);
            VBox.PackStart(authorLabel, false, false, 4);
            VBox.PackStart(notebook, true, true, 4);

            // Set up the buttons.
            Modal = true;

            AddButton("Close", ResponseType.Close);
        }
开发者ID:dmoonfire,项目名称:author-intrusion-cil,代码行数:74,代码来源:AboutWindow.cs


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