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


C# ToolButton.SetTooltip方法代码示例

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


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

示例1: DrawIcons

        protected override void DrawIcons()
        {
            _tbuttonClass = new Gtk.ToolButton ("");
            _tbuttonClass.IconWidget = new Gtk.Image (MonoUML.IconLibrary.PixbufLoader.GetIcon ("class_tree.png"));

            _tbuttonClass.SetTooltip (_tooltips, GettextCatalog.GetString ("Add a class"), GettextCatalog.GetString ("Add a class"));
            Insert (_tbuttonClass, -1);
        }
开发者ID:MonoBrasil,项目名称:historico,代码行数:8,代码来源:ToolbarClass.cs

示例2: CreateToolbar

 private Toolbar CreateToolbar()
 {
     Toolbar tb = new Toolbar();
        ToolbarTooltips = new Tooltips();
        SaveButton = new ToolButton(Gtk.Stock.Save);
        SaveButton.SetTooltip(ToolbarTooltips, Util.GS("Save the synchronization log"), "Toolbar/Save Log");
        SaveButton.Clicked += new EventHandler(SaveLogHandler);
        tb.Insert(SaveButton, -1);
        ClearButton = new ToolButton(Gtk.Stock.Clear);
        ClearButton.SetTooltip(ToolbarTooltips, Util.GS("Clear the synchronization log"), "Toolbar/Clear Log");
        ClearButton.Clicked += new EventHandler(ClearLogHandler);
        tb.Insert(ClearButton, -1);
        SaveButton.Sensitive = false;
        ClearButton.Sensitive = false;
        return tb;
 }
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:16,代码来源:LogWindow.cs

示例3: DefaultMonitorPad

        public DefaultMonitorPad(string title, string icon)
        {
            buffer = new Gtk.TextBuffer (new Gtk.TextTagTable ());
            textEditorControl = new Gtk.TextView (buffer);
            textEditorControl.Editable = false;
            scroller = new Gtk.ScrolledWindow ();
            scroller.ShadowType = ShadowType.In;
            scroller.Add (textEditorControl);

            Toolbar toolbar = new Toolbar ();
            toolbar.IconSize = IconSize.SmallToolbar;
            toolbar.Orientation = Orientation.Vertical;
            toolbar.ToolbarStyle = ToolbarStyle.Icons;

            buttonStop = new ToolButton ("gtk-stop");
            buttonStop.Clicked += new EventHandler (OnButtonStopClick);
            buttonStop.SetTooltip (tips, "Stop", "Stop");
            toolbar.Insert (buttonStop, -1);

            ToolButton buttonClear = new ToolButton ("gtk-clear");
            buttonClear.Clicked += new EventHandler (OnButtonClearClick);
            buttonClear.SetTooltip (tips, "Clear console", "Clear console");
            toolbar.Insert (buttonClear, -1);

            hbox = new HBox (false, 5);
            hbox.PackStart (scroller, true, true, 0);
            hbox.PackEnd (toolbar, false, false, 0);

            bold = new TextTag ("bold");
            bold.Weight = Pango.Weight.Bold;
            buffer.TagTable.Add (bold);

            tag = new TextTag ("0");
            tag.Indent = 10;
            buffer.TagTable.Add (tag);
            tags.Add (tag);

            Runtime.ProjectService.CombineOpened += (CombineEventHandler) Runtime.DispatchService.GuiDispatch (new CombineEventHandler (OnCombineOpen));
            Runtime.ProjectService.CombineClosed += (CombineEventHandler) Runtime.DispatchService.GuiDispatch (new CombineEventHandler (OnCombineClosed));

            this.title = title;
            this.icon = icon;
            this.markupTitle = title;

            Control.ShowAll ();
        }
开发者ID:slluis,项目名称:monodevelop-prehistoric,代码行数:46,代码来源:DefaultMonitorPad.cs

示例4: SearchResultPad

        public SearchResultPad()
        {
            // Toolbar

            Toolbar toolbar = new Toolbar ();
            toolbar.IconSize = IconSize.SmallToolbar;
            toolbar.Orientation = Orientation.Vertical;
            toolbar.ToolbarStyle = ToolbarStyle.Icons;

            buttonStop = new ToolButton ("gtk-stop");
            buttonStop.Clicked += new EventHandler (OnButtonStopClick);
            buttonStop.SetTooltip (tips, "Stop", "Stop");
            toolbar.Insert (buttonStop, -1);

            ToolButton buttonClear = new ToolButton ("gtk-clear");
            buttonClear.Clicked += new EventHandler (OnButtonClearClick);
            buttonClear.SetTooltip (tips, "Clear results", "Clear results");
            toolbar.Insert (buttonClear, -1);

            buttonOutput = new ToggleToolButton (MonoDevelop.Gui.Stock.OutputIcon);
            buttonOutput.Clicked += new EventHandler (OnButtonOutputClick);
            buttonOutput.SetTooltip (tips, "Show output", "Show output");
            toolbar.Insert (buttonOutput, -1);

            // Results list

            store = new Gtk.ListStore (
                typeof (Gdk.Pixbuf), // image
                typeof (int),        // line
                typeof (int),        // column
                typeof (string),     // desc
                typeof (string),     // file
                typeof (string),     // path
                typeof (string),     // full path
                typeof (bool),       // read?
                typeof (int),       // read? -- use Pango weight
                typeof (bool));       // is file

            view = new Gtk.TreeView (store);
            view.RulesHint = true;
            AddColumns ();

            sw = new Gtk.ScrolledWindow ();
            sw.ShadowType = ShadowType.In;
            sw.Add (view);

            // Log view

            logBuffer = new Gtk.TextBuffer (new Gtk.TextTagTable ());
            logTextView = new Gtk.TextView (logBuffer);
            logTextView.Editable = false;
            logScroller = new Gtk.ScrolledWindow ();
            logScroller.ShadowType = ShadowType.In;
            logScroller.Add (logTextView);

            // HPaned

            Gtk.HPaned paned = new Gtk.HPaned ();
            paned.Pack1 (sw, true, true);
            paned.Pack2 (logScroller, true, true);

            // HBox

            status = new Label ();
            status.Xalign = 0.0f;

            VBox vbox = new VBox ();
            vbox.PackStart (paned, true, true, 0);
            vbox.PackStart (status, false, false, 3);

            HBox hbox = new HBox ();
            hbox.PackStart (vbox, true, true, 0);
            hbox.PackStart (toolbar, false, false, 0);

            control = hbox;

            Control.ShowAll ();

            logScroller.Hide ();

            view.RowActivated += new RowActivatedHandler (OnRowActivated);
        }
开发者ID:slluis,项目名称:monodevelop-prehistoric,代码行数:82,代码来源:SearchResultPad.cs

示例5: MainWindow

	//
	// Constructor
	//
	public MainWindow (Db db)
	{
		this.db = db;

		if (Toplevel == null)
			Toplevel = this;

		Glade.XML gui = new Glade.XML (null, "f-spot.glade", "main_window", "f-spot");
		gui.Autoconnect (this);

		LoadPreference (Preferences.MAIN_WINDOW_WIDTH);
		LoadPreference (Preferences.MAIN_WINDOW_X);
		LoadPreference (Preferences.MAIN_WINDOW_MAXIMIZED);
		main_window.ShowAll ();

		LoadPreference (Preferences.SIDEBAR_POSITION);
		LoadPreference (Preferences.METADATA_EMBED_IN_IMAGE);

		LoadPreference (Preferences.COLOR_MANAGEMENT_ENABLED);
 		LoadPreference (Preferences.COLOR_MANAGEMENT_USE_X_PROFILE);
 		FSpot.ColorManagement.LoadSettings();
	
#if GTK_2_10
		pagesetup_menu_item.Activated += HandlePageSetupActivated;
#else
		pagesetup_menu_item.Visible = false;
#endif
		toolbar = new Gtk.Toolbar ();
		toolbar_vbox.PackStart (toolbar);

		ToolButton import_button = GtkUtil.ToolButtonFromTheme ("gtk-add", Catalog.GetString ("Import"), false);
		import_button.Clicked += HandleImportCommand;
		import_button.SetTooltip (ToolTips, Catalog.GetString ("Import new images"), null);
		toolbar.Insert (import_button, -1);
	
		toolbar.Insert (new SeparatorToolItem (), -1);

		ToolButton rl_button = GtkUtil.ToolButtonFromTheme ("object-rotate-left", Catalog.GetString ("Rotate Left"), true);
		rl_button.Clicked += HandleRotate270Command;
		toolbar.Insert (rl_button, -1);

		ToolButton rr_button = GtkUtil.ToolButtonFromTheme ("object-rotate-right", Catalog.GetString ("Rotate Right"), true);
		rr_button.Clicked += HandleRotate90Command;
		toolbar.Insert (rr_button, -1);

		toolbar.Insert (new SeparatorToolItem (), -1);

		browse_button = new ToggleToolButton ();
		browse_button.Label = Catalog.GetString ("Browse");
		browse_button.IconName = "mode-browse";
		browse_button.IsImportant = true;
		browse_button.Toggled += HandleToggleViewBrowse;
		browse_button.SetTooltip (ToolTips, Catalog.GetString ("Browse many photos simultaneously"), null);
		toolbar.Insert (browse_button, -1);

		edit_button = new ToggleToolButton ();
		edit_button.Label = Catalog.GetString ("Edit Image");
		edit_button.IconName = "mode-image-edit";
		edit_button.IsImportant = true;
		edit_button.Toggled += HandleToggleViewPhoto;
		edit_button.SetTooltip (ToolTips, Catalog.GetString ("View and edit a photo"), null);
		toolbar.Insert (edit_button, -1);

		toolbar.Insert (new SeparatorToolItem (), -1);

		ToolButton fs_button = GtkUtil.ToolButtonFromTheme ("view-fullscreen", Catalog.GetString ("Fullscreen"), true);
		fs_button.Clicked += HandleViewFullscreen;
		fs_button.SetTooltip (ToolTips, Catalog.GetString ("View photos fullscreen"), null);
		toolbar.Insert (fs_button, -1);

		ToolButton ss_button = GtkUtil.ToolButtonFromTheme ("media-playback-start", Catalog.GetString ("Slideshow"), true);
		ss_button.Clicked += HandleViewSlideShow;
		ss_button.SetTooltip (ToolTips, Catalog.GetString ("View photos in a slideshow"), null);
		toolbar.Insert (ss_button, -1);

		SeparatorToolItem white_space = new SeparatorToolItem ();
		white_space.Draw = false;
		white_space.Expand = true;
		toolbar.Insert (white_space, -1);

		ToolItem label_item = new ToolItem ();
		count_label = new Label (String.Empty);
		label_item.Child = count_label;
		toolbar.Insert (label_item, -1);

		display_previous_button = new ToolButton (Stock.GoBack);
		toolbar.Insert (display_previous_button, -1);
		display_previous_button.SetTooltip (ToolTips, Catalog.GetString ("Previous photo"), String.Empty);
		display_previous_button.Clicked += new EventHandler (HandleDisplayPreviousButtonClicked);

		display_next_button = new ToolButton (Stock.GoForward);
		toolbar.Insert (display_next_button, -1);
		display_next_button.SetTooltip (ToolTips, Catalog.GetString ("Next photo"), String.Empty);
		display_next_button.Clicked += new EventHandler (HandleDisplayNextButtonClicked);

		sidebar = new Sidebar ();
		ViewModeChanged += sidebar.HandleMainWindowViewModeChanged;
//.........这里部分代码省略.........
开发者ID:guadalinex-archive,项目名称:guadalinex-v6,代码行数:101,代码来源:MainWindow.cs

示例6: SingleView

        public SingleView(Uri [] uris)
        {
            string glade_name = "single_view";
            this.uri = uris [0];

            xml = new Glade.XML (null, "f-spot.glade", glade_name, "f-spot");
            xml.Autoconnect (this);
            window = (Gtk.Window) xml.GetWidget (glade_name);

            LoadPreference (Preferences.VIEWER_WIDTH);
            LoadPreference (Preferences.VIEWER_MAXIMIZED);

            Gtk.Toolbar toolbar = new Gtk.Toolbar ();
            toolbar_hbox.PackStart (toolbar);

            rl_button = GtkUtil.ToolButtonFromTheme ("object-rotate-left", Catalog.GetString ("Rotate Left"), true);
            rl_button.Clicked += HandleRotate270Command;
            rl_button.SetTooltip (toolTips, Catalog.GetString ("Rotate photo left"), null);
            toolbar.Insert (rl_button, -1);

            rr_button = GtkUtil.ToolButtonFromTheme ("object-rotate-right", Catalog.GetString ("Rotate Right"), true);
            rr_button.Clicked += HandleRotate90Command;
            rr_button.SetTooltip (toolTips, Catalog.GetString ("Rotate photo right"), null);
            toolbar.Insert (rr_button, -1);

            toolbar.Insert (new SeparatorToolItem (), -1);

            ToolButton fs_button = GtkUtil.ToolButtonFromTheme ("view-fullscreen", Catalog.GetString ("Fullscreen"), true);
            fs_button.Clicked += HandleViewFullscreen;
            fs_button.SetTooltip (toolTips, Catalog.GetString ("View photos fullscreen"), null);
            toolbar.Insert (fs_button, -1);

            ToolButton ss_button = GtkUtil.ToolButtonFromTheme ("media-playback-start", Catalog.GetString ("Slideshow"), true);
            ss_button.Clicked += HandleViewSlideshow;
            ss_button.SetTooltip (toolTips, Catalog.GetString ("View photos in a slideshow"), null);
            toolbar.Insert (ss_button, -1);

            collection = new UriCollection (uris);

            TargetEntry [] dest_table = {
                FSpot.DragDropTargets.UriListEntry,
                FSpot.DragDropTargets.PlainTextEntry
            };

            directory_view = new FSpot.Widgets.IconView (collection);
            directory_view.Selection.Changed += HandleSelectionChanged;
            directory_view.DragDataReceived += HandleDragDataReceived;
            Gtk.Drag.DestSet (directory_view, DestDefaults.All, dest_table,
                    DragAction.Copy | DragAction.Move);
            directory_view.DisplayTags = false;
            directory_view.DisplayDates = false;
            directory_view.DisplayRatings = false;

            directory_scrolled = new ScrolledWindow();
            directory_scrolled.Add (directory_view);

            sidebar = new Sidebar ();

            info_vbox.Add (sidebar);
            sidebar.AppendPage (directory_scrolled, Catalog.GetString ("Folder"), "gtk-directory");

            AddinManager.AddExtensionNodeHandler ("/FSpot/Sidebar", OnSidebarExtensionChanged);

            sidebar.Context = ViewContext.Single;

            sidebar.CloseRequested += HandleHideSidePane;
            sidebar.Show ();

            ThumbnailGenerator.Default.OnPixbufLoaded += delegate { directory_view.QueueDraw (); };

            image_view = new PhotoImageView (collection);
            GtkUtil.ModifyColors (image_view);
            GtkUtil.ModifyColors (image_scrolled);
            image_view.ZoomChanged += HandleZoomChanged;
            image_view.Item.Changed += HandleItemChanged;
            image_view.ButtonPressEvent += HandleImageViewButtonPressEvent;
            image_view.DragDataReceived += HandleDragDataReceived;
            Gtk.Drag.DestSet (image_view, DestDefaults.All, dest_table,
                    DragAction.Copy | DragAction.Move);
            image_scrolled.Add (image_view);

            Window.ShowAll ();

            zoom_scale.ValueChanged += HandleZoomScaleValueChanged;

            LoadPreference (Preferences.VIEWER_SHOW_TOOLBAR);
             			LoadPreference (Preferences.VIEWER_INTERPOLATION);
            LoadPreference (Preferences.VIEWER_TRANSPARENCY);
            LoadPreference (Preferences.VIEWER_TRANS_COLOR);

            ShowSidebar = collection.Count > 1;

            LoadPreference (Preferences.VIEWER_SHOW_FILENAMES);

            Preferences.SettingChanged += OnPreferencesChanged;
            window.DeleteEvent += HandleDeleteEvent;

            collection.Changed += HandleCollectionChanged;

            // wrap the methods to fit to the delegate
//.........这里部分代码省略.........
开发者ID:iainlane,项目名称:f-spot,代码行数:101,代码来源:SingleView.cs

示例7: MainWindow

        //
        // Constructor
        //
        public MainWindow(Db db)
        {
            foreach (ServiceNode service in AddinManager.GetExtensionNodes ("/FSpot/Services")) {
                try {
                    service.Initialize ();
                    service.Start ();
                } catch (Exception e) {
                    Log.Warning ("Something went wrong while starting the {0} extension.", service.Id);
                    Log.DebugException (e);
                }
            }

            #if GSD_2_24
            Log.Information ("Hack for gnome-settings-daemon engaged");
            int max_age, max_size;
            if (Preferences.TryGet<int> (Preferences.GSD_THUMBS_MAX_AGE, out max_age)) {
                if (max_age < 0)
                    Log.Debug ("maximum_age check already disabled, good");
                else if (max_age == 0)
                    Log.Warning ("maximum_age is 0 (tin-hat mode), not overriding");
                else if (max_age < 180) {
                    Log.Debug ("Setting maximum_age to a saner value");
                    Preferences.Set (Preferences.GSD_THUMBS_MAX_AGE, 180);
                }
            }

            if (Preferences.TryGet<int> (Preferences.GSD_THUMBS_MAX_SIZE, out max_size)) {
                int count = App.Instance.Database.Photos.Count ("photos");
                // average thumbs are taking 70K, so this will push the threshold
                //if f-spot takes more than 70% of the thumbs space
                int size = count / 10;
                if (max_size < 0)
                    Log.Debug ("maximum_size check already disabled, good");
                else if (max_size == 0)
                    Log.Warning ("maximum_size is 0 (tin-hat mode), not overriding");
                else if (max_size < size) {
                    Log.Debug ("Setting maximum_size to a saner value ({0}MB), according to your db size", size);
                    Preferences.Set (Preferences.GSD_THUMBS_MAX_SIZE, size);
                }
            }

            #endif
            Database = db;

            if (Toplevel == null)
                Toplevel = this;

            GtkBeans.Builder builder = new GtkBeans.Builder ("main_window.ui");
            builder.Autoconnect (this);

            //Set the global DefaultColormap. Allows transparency according
            //to the theme (work on murrine engine)
            Gdk.Colormap colormap = ((Widget)main_window).Screen.RgbaColormap;
            if (colormap == null) {
                Log.Debug ("Your screen doesn't support alpha channels!");
                colormap = ((Widget)main_window).Screen.RgbColormap;
            }
            Gtk.Widget.DefaultColormap = colormap;

            LoadPreference (Preferences.MAIN_WINDOW_WIDTH);
            LoadPreference (Preferences.MAIN_WINDOW_X);
            LoadPreference (Preferences.MAIN_WINDOW_MAXIMIZED);
            main_window.ShowAll ();

            LoadPreference (Preferences.SIDEBAR_POSITION);
            LoadPreference (Preferences.METADATA_EMBED_IN_IMAGE);

            pagesetup_menu_item.Activated += HandlePageSetupActivated;

            toolbar = new Gtk.Toolbar ();
            toolbar_vbox.PackStart (toolbar);

            ToolButton import_button = GtkUtil.ToolButtonFromTheme ("gtk-add", Catalog.GetString ("Import"), true);
            import_button.Clicked += HandleImportCommand;
            import_button.SetTooltip (ToolTips, Catalog.GetString ("Import new images"), null);
            toolbar.Insert (import_button, -1);

            toolbar.Insert (new SeparatorToolItem (), -1);

            rl_button = GtkUtil.ToolButtonFromTheme ("object-rotate-left", Catalog.GetString ("Rotate Left"), false);
            rl_button.Clicked += HandleRotate270Command;
            toolbar.Insert (rl_button, -1);

            rr_button = GtkUtil.ToolButtonFromTheme ("object-rotate-right", Catalog.GetString ("Rotate Right"), false);
            rr_button.Clicked += HandleRotate90Command;
            toolbar.Insert (rr_button, -1);

            toolbar.Insert (new SeparatorToolItem (), -1);

            browse_button = new ToggleToolButton ();
            browse_button.Label = Catalog.GetString ("Browse");
            browse_button.IconName = "mode-browse";
            browse_button.IsImportant = true;
            browse_button.Toggled += HandleToggleViewBrowse;
            browse_button.SetTooltip (ToolTips, Catalog.GetString ("Browse many photos simultaneously"), null);
            toolbar.Insert (browse_button, -1);

//.........这里部分代码省略.........
开发者ID:iainlane,项目名称:f-spot,代码行数:101,代码来源:MainWindow.cs

示例8: FileBrowser

        public FileBrowser()
        {
            messageService = (IMessageService) ServiceManager.GetService (typeof (IMessageService));

            scrolledwindow = new ScrolledWindow ();
            scrolledwindow.VscrollbarPolicy = PolicyType.Automatic;
            scrolledwindow.HscrollbarPolicy = PolicyType.Automatic;
            scrolledwindow.ShadowType = ShadowType.In;

            Toolbar toolbar = new Toolbar ();
            toolbar.IconSize = IconSize.SmallToolbar;

            goUp = new ToolButton (Stock.GoUp);
            goUp.Clicked += new EventHandler (OnGoUpClicked);
            goUp.SetTooltip (tips, GettextCatalog.GetString ("Go up one level"), "Go up one level");
            toolbar.Insert (goUp, -1);

            goHome = new ToolButton (Stock.Home);
            goHome.Clicked += new EventHandler (OnGoHomeClicked);
            goHome.SetTooltip (tips, GettextCatalog.GetString ("Home"), "Home");
            toolbar.Insert (goHome, -1);

            entry = new ToolbarEntry ();
            entry.Activated += new EventHandler (OnEntryActivated);
            entry.SetTooltip (tips, GettextCatalog.GetString ("Location"), "");
            toolbar.Insert (entry, -1);
            toolbar.ShowAll ();
            this.PackStart (toolbar, false, true, 0);

            IProperties p = (IProperties) PropertyService.GetProperty ("SharpDevelop.UI.SelectStyleOptions", new DefaultProperties ());
            ignoreHidden = !p.GetProperty ("MonoDevelop.Gui.FileScout.ShowHidden", false);

            tv = new Gtk.TreeView ();
            tv.RulesHint = true;

            TreeViewColumn directorycolumn = new TreeViewColumn ();
            directorycolumn.Title = "Directories";

            CellRendererPixbuf pix_render = new CellRendererPixbuf ();
            directorycolumn.PackStart (pix_render, false);
            directorycolumn.AddAttribute (pix_render, "pixbuf", 0);

            text_render = new CellRendererText ();
            text_render.Edited += new EditedHandler (OnDirEdited);
            directorycolumn.PackStart (text_render, false);
            directorycolumn.AddAttribute (text_render, "text", 1);

            tv.AppendColumn (directorycolumn);

            store = new ListStore (typeof (Gdk.Pixbuf), typeof (string));
            CurrentDir = Environment.GetFolderPath (Environment.SpecialFolder.Personal);
            tv.Model = store;

            tv.RowActivated += new RowActivatedHandler (OnRowActivated);
            tv.ButtonReleaseEvent += new ButtonReleaseEventHandler (OnButtonRelease);
            tv.PopupMenu += new PopupMenuHandler (OnPopupMenu);

            scrolledwindow.Add (tv);
            this.Homogeneous = false;
            this.PackEnd (scrolledwindow);
            this.ShowAll ();
            init = true;
        }
开发者ID:slluis,项目名称:monodevelop-prehistoric,代码行数:63,代码来源:FileBrowser.cs

示例9: CreateToolbar

		Toolbar CreateToolbar () 
		{
			Toolbar toolbar = new Toolbar ();
			toolbar.IconSize = IconSize.SmallToolbar;
			toolbar.ToolbarStyle = ToolbarStyle.Icons;

			ToolButton button1 = new Gtk.ToolButton (Stock.New); 
			button1.SetTooltip (tooltips1, "New", "New");
			button1.Clicked += new EventHandler(OnToolbar_FileNew);
			toolbar.Insert (button1, -1); 

			ToolButton button2 = new ToolButton (Stock.Open); 
			button2.SetTooltip (tooltips1, "Open", "Open");
			button2.Clicked += new EventHandler(OnToolbar_FileOpen);
			toolbar.Insert (button2, -1); 
						
			ToolButton button3 = new ToolButton (Stock.Save); 
			button3.SetTooltip (tooltips1, "Save", "Save");
			button3.Clicked += new EventHandler(OnToolbar_FileSave);
			toolbar.Insert (button3, -1); 
			
			Gtk.ToolButton button4 = new Gtk.ToolButton (Stock.Close); 
			button4.SetTooltip (tooltips1, "Close", "Close");
			button4.Clicked += new EventHandler(OnToolbar_FileClose);
			toolbar.Insert (button4, -1); 
			
			SeparatorToolItem sep = new SeparatorToolItem ();
			toolbar.Insert (sep, -1); 

			ToolButton button5 = new ToolButton (Stock.Execute); 
			button5.SetTooltip (tooltips1, "Execute Command\tF5", "Execute Command");
			button5.Clicked += new EventHandler(OnToolbar_ExecuteCommand);
			toolbar.Insert (button5, -1); 

			ToolButton button6 = new ToolButton (Stock.Execute); 
			button6.SetTooltip (tooltips1, "Execute Script", "Execute Script");
			button6.Clicked += new EventHandler(OnToolbar_ExecuteScript);
			toolbar.Insert (button6, -1); 
			
			ToolButton button7 = new ToolButton (Stock.GoDown); 
			button7.SetTooltip (tooltips1, "Output", "Output");
			button7.Clicked += new EventHandler(OnToolbar_ToggleResultsOutput);
			toolbar.Insert (button7, -1); 
			
			Gtk.ToolButton button8 = new Gtk.ToolButton (Stock.GoUp); 
			button8.SetTooltip (tooltips1, "Query Mode", "Query Mode");
			button8.Clicked += new EventHandler(OnToolbar_ToggleQueryMode);
			toolbar.Insert (button8, -1); 

			combo = ComboHelper.NewComboBox ();
			combo.Changed += new EventHandler (OnDataSourceChanged);
			combo.AppendText (NotConnected);
			ComboHelper.SetActiveText (combo, NotConnected);
			combo.Active = 0;
			ToolItem ti = new ToolItem();
			ti.Child = combo;
			toolbar.Insert (ti, -1); 

			return toolbar;
		}
开发者ID:emtees,项目名称:old-code,代码行数:60,代码来源:sqlsharpgtk.cs

示例10: CreateToolButton

 protected Gtk.ToolButton CreateToolButton(string pixbuf, string tooltip)
 {
     ToolButton rtn = new Gtk.ToolButton ("");
     rtn.IconWidget = new Gtk.Image (MonoUML.IconLibrary.PixbufLoader.GetIcon (pixbuf));
     rtn.SetTooltip (_tooltips, tooltip, tooltip);
     return rtn;
 }
开发者ID:MonoBrasil,项目名称:historico,代码行数:7,代码来源:ToolbarBase.cs


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