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


C# ToolButton.ShowAll方法代码示例

本文整理汇总了C#中Gtk.ToolButton.ShowAll方法的典型用法代码示例。如果您正苦于以下问题:C# ToolButton.ShowAll方法的具体用法?C# ToolButton.ShowAll怎么用?C# ToolButton.ShowAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Gtk.ToolButton的用法示例。


在下文中一共展示了ToolButton.ShowAll方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CreateToolbarItems

        protected void CreateToolbarItems()
        {
            Toolbar tools = GetWidgetByName("toolbar") as Toolbar;
            if(tools == null)
                return;

            ToolButton btn = new ToolButton("gtk-save");
            btn.Label = "Uložit a zavřít";
            btn.Clicked += SaveCloseAction;
            tools.Add(btn);
            btn.ShowAll();

            btn = new ToolButton("gtk-save");
            btn.Label = "Uložit";
            btn.Clicked += SaveAction;
            tools.Add(btn);
            btn.ShowAll();

            btn = new ToolButton("gtk-delete");
            btn.Label = "Odstranit";
            btn.Clicked += DeleteAction;
            tools.Add(btn);
            btn.ShowAll();
        }
开发者ID:langpavel,项目名称:LPS-old,代码行数:24,代码来源:AutobindWindow.cs

示例2: GameViewer

            private GameViewer()
            {
                title = "Game Viewer";
                loader = new GameLoader (this);
                accel = new AccelGroup ();
                initialDirForFileChooser =
                    App.Session.CurrentFolder;

                gameLoaders = new ArrayList ();
                exporters = new ArrayList ();

                menubar.highlightMoveMenuItem.Active =
                    App.Session.HighLightMove;

                menubar.saveAsMenuItem.Activated +=
                    on_save_as_activate;
                menubar.switchSideMenuItem.Activated +=
                    on_switch_side_activate;
                menubar.moveCommentMenuItem.Activated +=
                    OnEditCommentActivated;
                menubar.highlightMoveMenuItem.Activated +=
                    OnHighlightMoveMenuItemActivated;
                menubar.switchSideMenuItem.
                    AddAccelerator ("activate", accel,
                            new AccelKey (Gdk.Key.
                                      t,
                                      Gdk.
                                      ModifierType.
                                      ControlMask,
                                      AccelFlags.
                                      Visible));

                menubar.quitMenuItem.
                    AddAccelerator ("activate", accel,
                            new AccelKey (Gdk.Key.
                                      q,
                                      Gdk.
                                      ModifierType.
                                      ControlMask,
                                      AccelFlags.
                                      Visible));

                Gtk.Image img = new Gtk.Image ();
                img.Stock = Stock.JustifyFill;
                toolbutton =
                    new ToolButton (img,
                            Catalog.
                            GetString ("Viewer"));
                ShowAll ();
                toolbutton.ShowAll ();
                progressBar.Hide ();

                gameViewerWidget.ChessGameWidget.SplitPane.
                    Position =
                    App.Session.ViewerSplitPanePosition;

                CsBoardApp.Instance.QuitEvent += OnQuitEvent;
            }
开发者ID:BackupTheBerlios,项目名称:csboard-svn,代码行数:58,代码来源:GameViewer.cs

示例3: MakeToolbar

		//
		// Toolbar
		//
		// Add Link button, Font menu, Delete button to the window's
		// toolbar.
		//

		Gtk.Toolbar MakeToolbar ()
		{
			Gtk.Toolbar tb = new Gtk.Toolbar ();
			tb.Tooltips = true;

			toolbar_tips = new Gtk.Tooltips ();

			Gtk.ToolButton search = new Gtk.ToolButton (
				new Gtk.Image (Gtk.Stock.Find, tb.IconSize),
				Catalog.GetString ("Search"));
			search.IsImportant = true;
			search.Clicked += SearchActivate;
			// TODO: If we ever add a way to customize internal keybindings, this will need to change
			toolbar_tips.SetTip (search, Catalog.GetString ("Search your notes") + " (Ctrl-Shift-F)", null);
			search.AddAccelerator ("clicked",
			                       accel_group,
			                       (uint) Gdk.Key.f,
			                       (Gdk.ModifierType.ControlMask |
			                        Gdk.ModifierType.ShiftMask),
			                       Gtk.AccelFlags.Visible);
			search.ShowAll ();
			tb.Insert (search, -1);

			link_button = new Gtk.ToolButton (
				new Gtk.Image (Gtk.Stock.JumpTo, tb.IconSize),
				Catalog.GetString ("Link"));
			link_button.IsImportant = true;
			link_button.Sensitive = (note.Buffer.Selection != null);
			link_button.Clicked += LinkToNoteActivate;
			// TODO: If we ever add a way to customize internal keybindings, this will need to change
			toolbar_tips.SetTip (
				link_button,
				Catalog.GetString ("Link selected text to a new note") + " (Ctrl-L)",
				null);
			link_button.AddAccelerator ("clicked",
			                            accel_group,
			                            (uint) Gdk.Key.l,
			                            Gdk.ModifierType.ControlMask,
			                            Gtk.AccelFlags.Visible);
			link_button.ShowAll ();
			tb.Insert (link_button, -1);

			ToolMenuButton text_button =
			        new ToolMenuButton (tb,
			                            Gtk.Stock.SelectFont,
			                            Catalog.GetString ("_Text"),
			                            text_menu);
			text_button.IsImportant = true;
			text_button.ShowAll ();
			tb.Insert (text_button, -1);
			toolbar_tips.SetTip (text_button, Catalog.GetString ("Set properties of text"), null);

			ToolMenuButton plugin_button =
			        new ToolMenuButton (tb,
			                            Gtk.Stock.Execute,
			                            Catalog.GetString ("T_ools"),
			                            plugin_menu);
			plugin_button.ShowAll ();
			tb.Insert (plugin_button, -1);
			toolbar_tips.SetTip (plugin_button, Catalog.GetString ("Use tools on this note"), null);

			tb.Insert (new Gtk.SeparatorToolItem (), -1);

			delete = new Gtk.ToolButton (Gtk.Stock.Delete);
			delete.Clicked += OnDeleteButtonClicked;
			delete.ShowAll ();
			tb.Insert (delete, -1);
			toolbar_tips.SetTip (delete, Catalog.GetString ("Delete this note"), null);

			// Don't allow deleting the "Start Here" note...
			if (note.IsSpecial)
				delete.Sensitive = false;

			tb.Insert (new Gtk.SeparatorToolItem (), -1);

			sync_menu_item = new Gtk.ImageMenuItem (Catalog.GetString ("Synchronize Notes"));
			sync_menu_item.Image = new Gtk.Image (Gtk.Stock.Convert, Gtk.IconSize.Menu);
			sync_menu_item.Activated += SyncItemSelected;
			sync_menu_item.Show ();
			PluginMenu.Add (sync_menu_item);

			// We might want to know when various settings are altered.
			Preferences.SettingChanged += Preferences_SettingChanged;

			// Update items based on configuration.
			UpdateMenuItems ();

			tb.ShowAll ();
			return tb;
		}
开发者ID:oluc,项目名称:tomboy,代码行数:97,代码来源:NoteWindow.cs


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