本文整理汇总了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;
}
示例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;
}
示例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;
}
示例4: CellRendererComboBox
public CellRendererComboBox ()
{
Mode |= Gtk.CellRendererMode.Editable;
Entry dummyEntry = new Gtk.Entry ();
rowHeight = dummyEntry.SizeRequest ().Height;
}
示例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;
}