本文整理汇总了C#中Alignment.Show方法的典型用法代码示例。如果您正苦于以下问题:C# Alignment.Show方法的具体用法?C# Alignment.Show怎么用?C# Alignment.Show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Alignment
的用法示例。
在下文中一共展示了Alignment.Show方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetRightPane
private Widget GetRightPane()
{
VBox vbox = new VBox ();
// labels
moveNumberLabel = new Label ();
nagCommentLabel = new Label ();
nagCommentLabel.Xalign = 0;
HBox hbox = new HBox ();
hbox.PackStart (moveNumberLabel, false, false,
2);
hbox.PackStart (nagCommentLabel, false, false,
2);
vbox.PackStart (hbox, false, false, 2);
// board
chessGameDetailsBox = new VBox ();
chessGameDetailsBox.PackStart (gameView,
true, true, 4);
vbox.PackStart (chessGameDetailsBox, true,
true, 2);
// buttons
playButton = new PlayPauseButton ();
playButton.PlayNextEvent +=
on_play_next_event;
firstButton = new Button ();
firstButton.Clicked += on_first_clicked;
firstButton.Image =
new Image (Stock.GotoFirst,
IconSize.Button);
prevButton = new Button ();
prevButton.Clicked += on_prev_clicked;
prevButton.Image =
new Image (Stock.GoBack,
IconSize.Button);
nextButton = new Button ();
nextButton.Clicked += on_next_clicked;
nextButton.Image =
new Image (Stock.GoForward,
IconSize.Button);
lastButton = new Button ();
lastButton.Clicked += on_last_clicked;
lastButton.Image =
new Image (Stock.GotoLast,
IconSize.Button);
HBox bbox = new HBox ();
bbox.PackStart (firstButton, false, false, 1);
bbox.PackStart (prevButton, false, false, 1);
bbox.PackStart (playButton, false, false, 1);
bbox.PackStart (nextButton, false, false, 1);
bbox.PackStart (lastButton, false, false, 1);
Alignment alignment =
new Alignment (0.5f, 1, 0, 0);
alignment.Add (bbox);
alignment.Show ();
vbox.PackStart (alignment, false, false, 2);
book.AppendPage (gamesListWidget,
new Label (Catalog.
GetString
("Games")));
book.AppendPage (vbox,
new Label (Catalog.
GetString
("Current Game")));
return book;
}
示例2: GetRightPane
private VBox GetRightPane()
{
VBox vbox = new VBox ();
// labels
moveNumberLabel = new Label ();
nagCommentLabel = new Label ();
nagCommentLabel.Xalign = 0;
HBox hbox = new HBox ();
hbox.PackStart (moveNumberLabel, false, false,
2);
hbox.PackStart (nagCommentLabel, false, false,
2);
vbox.PackStart (hbox, false, false, 2);
// board
chessGameDetailsBox = new VBox ();
chessGameDetailsBox.PackStart (gameView,
true, true, 4);
vbox.PackStart (chessGameDetailsBox, true,
true, 2);
// buttons
firstButton = new Button ();
firstButton.Clicked += on_first_clicked;
firstButton.Image =
new Image (Stock.GotoFirst,
IconSize.Button);
prevButton = new Button ();
prevButton.Clicked += on_prev_clicked;
prevButton.Image =
new Image (Stock.GoBack,
IconSize.Button);
nextButton = new Button ();
nextButton.Clicked += on_next_clicked;
nextButton.Image =
new Image (Stock.GoForward,
IconSize.Button);
lastButton = new Button ();
lastButton.Clicked += on_last_clicked;
lastButton.Image =
new Image (Stock.GotoLast,
IconSize.Button);
HBox bbox = new HBox ();
bbox.PackStart (firstButton, false, false, 1);
bbox.PackStart (prevButton, false, false, 1);
bbox.PackStart (nextButton, false, false, 1);
bbox.PackStart (lastButton, false, false, 1);
Alignment alignment =
new Alignment (0.5f, 1, 0, 0);
alignment.Add (bbox);
alignment.Show ();
vbox.PackStart (alignment, false, false, 2);
return vbox;
}