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


C# ToolButton.Show方法代码示例

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


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

示例1: ToolbarButton

 public ToolbarButton(ICommand cmd)
     : base(cmd)
 {
     button = new ToolButton(cmd.Properties.Icon);
     button.Clicked += new EventHandler (OnClicked);
     button.Label = cmd.Properties.Text;
     this.Add(button);
     button.Show();
     this.ShowAll();
 }
开发者ID:BackupTheBerlios,项目名称:sofia-svn,代码行数:10,代码来源:ToolbarFactories.cs

示例2: Initialize

		public override void Initialize ()
		{
			separator = new Gtk.SeparatorToolItem ();
			separator.Show ();
			
			record_button = new Gtk.ToolButton (Gtk.Stock.MediaRecord);
			record_button.Clicked += OnRecordButtonClicked;
			record_button.Show ();

			play_button = new Gtk.ToolButton (Gtk.Stock.MediaPlay);
			play_button.Clicked += OnPlayButtonClicked;
			play_button.Show ();
			
			stop_button = new Gtk.ToolButton (Gtk.Stock.MediaStop);
			stop_button.Clicked += OnStopButtonClicked;
			stop_button.Show ();

			delete_item = new Gtk.MenuItem ("Delete Voice Note");
			delete_item.Activated += OnDeleteItemActivated;
			delete_item.Show ();
		
			initialize ();
		}
开发者ID:MichaelAquilina,项目名称:tomboy,代码行数:23,代码来源:VoiceNote.cs

示例3: ModelerCanvasWidget

        public ModelerCanvasWidget(ModelerCanvas owner, modelController controller)
        {
            this.Build ();
            _owner = owner;
            _controller = controller;
            VBox mainVbox = new VBox (false, 6);
            mainVbox.BorderWidth = 6;
            this.Add(mainVbox);

            //Create Toolbar
            Toolbar toolbar = new Toolbar ();
            toolbar.Name = "toolbar";
            toolbar.ShowArrow = true;
            toolbar.IconSize = Gtk.IconSize.LargeToolbar;
            toolbar.ToolbarStyle = ToolbarStyle.BothHoriz;
            toolbar.Sensitive=true;
            toolbar.Activate();
            mainVbox.Add(toolbar);
            Gtk.Box.BoxChild w1 = ((Gtk.Box.BoxChild)(mainVbox[toolbar]));
            w1.Position = 0;
            w1.Expand = false;
            w1.Fill = true;

            //Create SCrollWindow
            mainScrolledWindow = new ScrolledWindow();
            mainScrolledWindow.Activate();
            mainScrolledWindow.SetPolicy( Gtk.PolicyType.Always,Gtk.PolicyType.Always);
            mainScrolledWindow.CanFocus = true;
            mainScrolledWindow.Name = "mainScrolledWindow";
            mainScrolledWindow.ShadowType = ((Gtk.ShadowType)(1));
            mainVbox.Add(mainScrolledWindow);
            Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(mainVbox[mainScrolledWindow]));
             			w2.Position = 1;
            w2.Fill=true;
            w2.Expand=true;

            //Create Toolbar Buttons

            //Add New Table
            buttonNew = new ToolButton(new Gtk.Image (Gtk.Stock.New, IconSize.Button),"Add Table");
            buttonNew.Sensitive = true;
            buttonNew.TooltipMarkup = "Add a new empty table";
            buttonNew.IsImportant = true;
            buttonNew.Clicked += new EventHandler (OnbuttonNewActionActivated);
            buttonNew.Activate();
            buttonNew.Show();
            toolbar.Add (buttonNew);
            //Create a Relationship between two tables
            buttonRelationship = new ToolButton(new Gtk.Image (Gtk.Stock.New, IconSize.Button),"Relationship");
            buttonRelationship.Sensitive = true;
            buttonRelationship.TooltipMarkup = "Add a new relationship between tables";
            buttonRelationship.IsImportant = true;
            buttonRelationship.Clicked += new EventHandler (OnbuttonRelationshipActivated);
            buttonRelationship.Activate();
            buttonRelationship.Show();
            toolbar.Add (buttonRelationship);
            //Delete Selected Figure(s)
            buttonDelete = new ToolButton(new Gtk.Image (Gtk.Stock.New, IconSize.Button),"Remove");
            buttonDelete.Sensitive = true;
                buttonDelete.TooltipMarkup = "Remove selected figure(s) from diagram (table or relationship)";
            buttonDelete.IsImportant = true;
            buttonDelete.Clicked += new EventHandler (buttonDeleteRelationshipActivated);
            buttonDelete.Activate();
            buttonDelete.Show();
            toolbar.Add (buttonDelete);
            //Select Active Database
            comboConnections = new DatabaseConnectionContextComboBox ();
            selectedConnection = comboConnections.DatabaseConnection;
            comboConnections.Changed += new EventHandler (ConnectionChanged);
            ToolItem comboItem = new ToolItem ();
            comboItem.Child = comboConnections;
            comboItem.Show();
            toolbar.Add (new SeparatorToolItem ());
            toolbar.Add (comboItem);
            //Show all items
            mainVbox.ShowAll ();
        }
开发者ID:xiul,项目名称:Monodevelop-Database-Modeler-Addin,代码行数:77,代码来源:ModelerCanvasWidget.cs

示例4: AddWidgetCommands

		protected virtual void AddWidgetCommands (ObjectWrapper wrapper)
		{
			if (allowBinding && wrapper != RootWidget) {
				// Show the Bind to Field button only for children of the root container.
				ToolButton bindButton = new ToolButton (null, Catalog.GetString ("Bind to Field"));
				bindButton.IsImportant = true;
				bindButton.Clicked += delegate { frontend.NotifyBindField (); };
				bindButton.Show ();
				Insert (bindButton, -1);
			}
			AddCommands (wrapper);
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:12,代码来源:WidgetActionBar.cs


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