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


C# Entry.SizeRequest方法代码示例

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


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

示例1: CellRendererCatalogSelector

 public CellRendererCatalogSelector (String model)
 {
     Mode |= Gtk.CellRendererMode.Editable;
     Entry dummyEntry = new Gtk.Entry ();
     rowHeight = dummyEntry.SizeRequest ().Height;
     combo = new CatalogSelector ();
     combo.Model = model;
     combo.Changed += SelectionChanged;
 }
开发者ID:monsterlabs,项目名称:HumanRightsTracker,代码行数:9,代码来源:CellRendererCatalogSelector.cs

示例2: LevelRangeWidget

        public LevelRangeWidget(string label, int low, int high)
        {
            IConfigSource config = new DotNetConfigSource(DotNetConfigSource.GetFullConfigPath());

            int entrySize = config.Configs["defaults"].GetInt("entrySize");
            int entryWidth = config.Configs["defaults"].GetInt("entryWidth");

            Low = new Entry(entrySize);
            Low.SetSizeRequest(entryWidth, Low.SizeRequest().Height);
            Low.WidthChars = entrySize;
            Low.IsEditable = false;
            Low.CanFocus = false;

            Label = new Label(label);
            Label.Justify = Justification.Center;
            Label.SetSizeRequest(150, Label.SizeRequest().Height);

            High = new Entry(entrySize);
            High.SetSizeRequest(entryWidth, High.SizeRequest().Height);
            High.WidthChars = entrySize;
            High.IsEditable = false;
            High.CanFocus = false;
        }
开发者ID:Nemesis-Xero,项目名称:ds-level-ranger,代码行数:23,代码来源:LevelRangeWidget.cs

示例3: CreateServerPage

 private Widget CreateServerPage()
 {
     VBox vbox = new VBox(false, 0);
        Table table = new Table(6, 2, false);
        vbox.PackStart(table, true, true, 0);
        table.ColumnSpacing = 12;
        table.RowSpacing = 6;
        table.BorderWidth = 12;
        Label l = new Label(Util.GS("Name:"));
        table.Attach(l,
        0,1, 0,1,
        AttachOptions.Shrink | AttachOptions.Fill,
        0,0,0);
        l.Xalign = 0;
        l = new Label(domain.Name);
        table.Attach(l,
        1,2, 0,1,
        AttachOptions.Expand | AttachOptions.Fill,
        0,0,0);
        l.UseUnderline = false;
        l.Xalign = 0;
        l = new Label(Util.GS("Address:"));
        table.Attach(l,
        0,1, 1,2,
        AttachOptions.Expand | AttachOptions.Fill,
        0,0,0);
        l.Xalign = 0;
        l.Yalign = 0;
        ServerAddressEntry = new Entry();
        table.Attach(ServerAddressEntry,
        1,2, 1,2,
        AttachOptions.Shrink | AttachOptions.Fill,
        0,0,0);
        l.UseUnderline = false;
        l.MnemonicWidget = ServerAddressEntry;
        l = new Label(Util.GS("(You can change the address if you are offline)"));
        table.Attach(l,
        1,2, 2,3,
        AttachOptions.Shrink | AttachOptions.Fill,
        0,0,0);
        l.LineWrap = true;
        l.Wrap = true;
        l.Xalign = 0;
        l.Sensitive = false;
        Requisition req = ServerAddressEntry.SizeRequest();
        l.WidthRequest = req.Width;
        ScrolledWindow sw = new ScrolledWindow();
        table.Attach(sw,
        0,2, 3,4,
        AttachOptions.Expand | AttachOptions.Fill,
        0,0,0);
        sw.ShadowType = Gtk.ShadowType.EtchedIn;
        ServerDescriptionTextView = new TextView();
        if(domain.Description != null)
     ServerDescriptionTextView.Buffer.Text = domain.Description;
        ServerDescriptionTextView.WrapMode = Gtk.WrapMode.Word;
        ServerDescriptionTextView.Editable = false;
        ServerDescriptionTextView.Sensitive = false;
        ServerDescriptionTextView.CursorVisible = false;
        ServerDescriptionTextView.RightMargin = 5;
        ServerDescriptionTextView.LeftMargin = 5;
        sw.Add(ServerDescriptionTextView);
        return vbox;
 }
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:64,代码来源:EnterpriseAccountDialog.cs

示例4: CellRendererComboBox

		public CellRendererComboBox ()
		{
			Mode |= Gtk.CellRendererMode.Editable;
			Entry dummyEntry = new Gtk.Entry ();
			rowHeight = dummyEntry.SizeRequest ().Height;
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:6,代码来源:CellRendererComboBox.cs

示例5: CellRendererProperty

        public CellRendererProperty(TreeView tree)
        {
            this.tree = tree;
            Xalign = 0;
            Xpad = 3;

            Mode |= Gtk.CellRendererMode.Editable;
            Entry dummyEntry = new Gtk.Entry ();
            dummyEntry.HasFrame = false;
            rowHeight = dummyEntry.SizeRequest ().Height;
        }
开发者ID:mono,项目名称:stetic,代码行数:11,代码来源:PropertyTree.cs


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