本文整理汇总了C#中Gtk.Frame.SetSizeRequest方法的典型用法代码示例。如果您正苦于以下问题:C# Frame.SetSizeRequest方法的具体用法?C# Frame.SetSizeRequest怎么用?C# Frame.SetSizeRequest使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gtk.Frame
的用法示例。
在下文中一共展示了Frame.SetSizeRequest方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DemoPanes
public DemoPanes () : base ("Panes")
{
VBox vbox = new VBox (false, 0);
Add (vbox);
VPaned vpaned = new VPaned ();
vbox.PackStart (vpaned, true, true, 0);
vpaned.BorderWidth = 5;
HPaned hpaned = new HPaned ();
vpaned.Add1 (hpaned);
Frame frame = new Frame ();
frame.ShadowType = ShadowType.In;
frame.SetSizeRequest (60, 60);
hpaned.Add1 (frame);
Gtk.Button button = new Button ("_Hi there");
frame.Add (button);
frame = new Frame ();
frame.ShadowType = ShadowType.In;
frame.SetSizeRequest (80, 60);
hpaned.Add2 (frame);
frame = new Frame ();
frame.ShadowType = ShadowType.In;
frame.SetSizeRequest (60, 80);
vpaned.Add2 (frame);
// Now create toggle buttons to control sizing
vbox.PackStart (CreatePaneOptions (hpaned,
"Horizontal",
"Left",
"Right"),
false, false, 0);
vbox.PackStart (CreatePaneOptions (vpaned,
"Vertical",
"Top",
"Bottom"),
false, false, 0);
ShowAll ();
}
示例2: CreateAppList
private Widget CreateAppList()
{
var scroll = new ScrolledWindow();
appListStore = new ListStore(typeof(string), typeof(Pixbuf));
appTv = new TreeView();
scroll.Add(appTv);
appTv.HeadersVisible = false;
var col = new TreeViewColumn();
col.Title = "Name";
var colRender2 = new CellRendererPixbuf();
col.PackStart(colRender2, false);
col.AddAttribute(colRender2, "pixbuf", 1);
var colRender = new CellRendererText();
colRender.Ellipsize = Pango.EllipsizeMode.End;
col.PackStart(colRender, true);
col.AddAttribute(colRender, "markup", 0);
appTv.AppendColumn(col);
var frame = new Frame();
frame.Add(scroll);
frame.SetSizeRequest(300, 200);
return frame;
}