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


C# Alignment.Show方法代码示例

本文整理汇总了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;
            }
开发者ID:BackupTheBerlios,项目名称:csboard-svn,代码行数:73,代码来源:ChessGameWidget.cs

示例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;
            }
开发者ID:BackupTheBerlios,项目名称:csboard-svn,代码行数:60,代码来源:ChessGameWidget.cs


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