本文整理汇总了C#中Gtk.Alignment.SetSizeRequest方法的典型用法代码示例。如果您正苦于以下问题:C# Alignment.SetSizeRequest方法的具体用法?C# Alignment.SetSizeRequest怎么用?C# Alignment.SetSizeRequest使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gtk.Alignment
的用法示例。
在下文中一共展示了Alignment.SetSizeRequest方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: BuildWidgets
private void BuildWidgets()
{
drawing_area = new DrawingArea ();
drawing_area.ExposeEvent += HandleDrawingAreaExposeEvent;
drawing_area.Show ();
drawing_area_alignment = new Alignment (0, 0, 1, 1);
drawing_area_alignment.SetSizeRequest (-1, 32);
drawing_area_alignment.Add (drawing_area);
PackStart (drawing_area_alignment);
detect_button = new Button (Catalog.GetString ("D_etect"));
detect_button.Clicked += HandleDetectButtonClicked;
detect_button.Show ();
PackEnd (detect_button);
ShowAll ();
}
示例2: Construct
private void Construct()
{
// Constructing title textview
_titleTextView = new TextView();
TextBuffer titleBuffer = _titleTextView.Buffer;
titleBuffer.Text = this._item.GetTitle();
// Constructing the title Alignment
_titleAlignment = new Alignment (0, 0, 0, 0);
_titleAlignment.SetSizeRequest (80, 25);
// Constructing content textview
_contentTextView = new TextView ();
TextBuffer contentBuffer = _contentTextView.Buffer;
contentBuffer.Text = this._item.GetContent();
// constructing content alignment
_contentAlignment = new Alignment (0, 0, 0, 1);
SwitchTitleView(false);
SwitchContentView(false);
}