• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Gtk.Label类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



Label类属于Gtk命名空间,在下文中一共展示了Label类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: GetButton

		public static Widget GetButton (Action action, bool label)
		{
			Widget w = action.CreateIcon (IconSize.Button);
			if (label) {
				HBox box = new HBox ();
				box.PackStart (w, false, false, 0);
				Label l = new Label ();
				l.Markup = "<small>" + action.Label + "</small>";
				box.PackStart (l);
				w = box;
			}
			Button button;
			if (action is ToggleAction) {
				ToggleButton toggle = new ToggleButton ();
				toggle.Active = ((ToggleAction)action).Active;
				button = toggle;
			} else {
				button = new Button ();
			}
			button.Relief = ReliefStyle.None;
			button.Add (w);
			w.ShowAll ();

			action.ConnectProxy (button);
			tips.SetTip (button, action.Tooltip, String.Empty);
			return button;
		}
开发者ID:AminBonyadUni,项目名称:facedetect-f-spot,代码行数:27,代码来源:ItemAction.cs


示例2: ListPage

        public ListPage(Notebook notebook, ModulesTreeInfo module)
        {
            this.notebook = notebook;
            this.module = module;

            headerbox = new HBox();
            headerlabel = new Label(module.Text);
            headerbox.PackStart(headerlabel);
            //Image img = new Image("gtk-close", IconSize.Menu);
            close_img = ImageManager.GetImage("Images.close-button.png");
            //close_img = new Image("gtk-close", IconSize.Menu);
            btnCloseTab = new Button(close_img);
            btnCloseTab.BorderWidth = 0;
            btnCloseTab.Relief = ReliefStyle.None;
            //btnCloseTab.WidthRequest = 19;
            //btnCloseTab.HeightRequest = 19;
            btnCloseTab.Clicked += delegate { this.Dispose(); };
            headerbox.PackStart(btnCloseTab);
            headerbox.ShowAll();

            tableview = new DataTableView(module);
            this.Add(tableview);
            this.ShowAll();

            notebook.AppendPage(this, headerbox);
            notebook.SetTabReorderable(this, true);
        }
开发者ID:langpavel,项目名称:LPS-old,代码行数:27,代码来源:ListPage.cs


示例3: AttributeEntry

        public AttributeEntry(FileTemplate.Attribute attribute)
        {
            this.attribute = attribute;

            Label lblApp = new Label(attribute.Name.Replace("_","__")+": ");
            lblApp.Xalign = 1;
            lblApp.Yalign = 0.5F;
            lblApp.WidthRequest = 115;
            Entry entr = new Entry();
            entr.Name = "entr";
            if (attribute.Value != null)
                entr.Text = attribute.Value.ToString();

            entr.Changed+= delegate(object sender, EventArgs e) {

                if (!String.IsNullOrEmpty(attribute.ValidateExpr)){
                    Regex regex = new Regex(attribute.ValidateExpr, RegexOptions.Compiled);
                    if (regex.IsMatch(entr.Text)){
                        this.attribute.Value = (object)entr.Text;
                    } else {
                        if (attribute.Value != null)
                        entr.Text = attribute.Value.ToString();
                    }

                } else
                    this.attribute.Value = (object)entr.Text;
            };

            this.PackStart(lblApp,false,false,2);
            this.PackEnd(entr,true,true,2);
        }
开发者ID:moscrif,项目名称:ide,代码行数:31,代码来源:AttributeEntry.cs


示例4: FormOrder

		public FormOrder() : base(4,2, false)
		{
			labelid = new Label("Id :");
			labelid.SetAlignment(0, (float)0.5);
			labelcust = new Label("Customer :");
			labelcust.SetAlignment(0, (float)0.5);
			labelpay = new Label("Payment :");
			labelpay.SetAlignment(0, (float)0.5);
			labeltax = new Label("Tax :");
			labeltax.SetAlignment(0, (float)0.5);
			
			entryid = new Entry();
			entryid.Sensitive = false;
			
			combocust = new ComboBoxCustomers();
			combopay = new ComboBoxPayments();
			combopay.NoneRow = true;
			combotax = new ComboBoxTaxes();
			combotax.NoneRow = true;
			
			this.ColumnSpacing = 6;
			Attach(labelid, 0, 1, 0, 1);
			Attach(labelcust, 0, 1, 1, 2);
			Attach(labelpay, 0, 1, 2, 3);
			Attach(labeltax, 0, 1, 3, 4);

			Attach(entryid, 1, 2, 0, 1);
			Attach(combocust, 1, 2, 1, 2);
			Attach(combopay, 1, 2, 2, 3);
			Attach(combotax, 1, 2, 3, 4);
			
			this.ShowAll();
		}
开发者ID:hpbaotho,项目名称:supos,代码行数:33,代码来源:FormOrder.cs


示例5: AboutPintaTabPage

        public AboutPintaTabPage()
        {
            Label label = new Label ();
            label.Markup = String.Format (
                "<b>{0}</b>\n    {1}",
                Catalog.GetString ("Version"),
                "1.2");

            HBox hBoxVersion = new HBox ();
            hBoxVersion.PackStart (label, false, false, 5);
            this.PackStart (hBoxVersion, false, true, 0);

            label = null;
            label = new Label ();
            label.Markup = string.Format ("<b>{0}</b>\n    {1}", Catalog.GetString ("License"), Catalog.GetString ("Released under the MIT X11 License."));
            HBox hBoxLicense = new HBox ();
            hBoxLicense.PackStart (label, false, false, 5);
            this.PackStart (hBoxLicense, false, true, 5);

            label = null;
            label = new Label ();
            label.Markup = string.Format ("<b>{0}</b>\n    (c) 2010-2011 {1}", Catalog.GetString ("Copyright"), Catalog.GetString ("by Pinta contributors"));
            HBox hBoxCopyright = new HBox ();
            hBoxCopyright.PackStart (label, false, false, 5);
            this.PackStart (hBoxCopyright, false, true, 5);

            this.ShowAll ();
        }
开发者ID:tackle-cat,项目名称:Pinta,代码行数:28,代码来源:AboutPintaTabPage.cs


示例6: ParameterInformationWindow

		public ParameterInformationWindow ()
		{
			heading = new Gtk.Label ("");
			heading.Xalign = 0;
			heading.Wrap = false;
			
			desc = new DescriptionLabel ();
			count = new Gtk.Label ("");

			var mainBox = new HBox (false, 2);
			
			HBox arrowHBox = new HBox ();

			goPrev = new Gtk.Arrow (Gtk.ArrowType.Up, ShadowType.None);
			arrowHBox.PackStart (goPrev, false, false, 0);
			arrowHBox.PackStart (count, false, false, 0);
			goNext = new Gtk.Arrow (Gtk.ArrowType.Down, ShadowType.None);
			arrowHBox.PackStart (goNext, false, false, 0);

			VBox vBox = new VBox ();
			vBox.PackStart (arrowHBox, false, false, 0);
			
			mainBox.PackStart (vBox, false, false, 0);
			mainBox.PackStart (heading, true, true, 0);
			
			var vBox2 = new VBox ();
			vBox2.BorderWidth = 3;
			vBox2.PackStart (mainBox, false, false, 0);
			vBox2.PackStart (desc, true, true, 4);
			Add (vBox2);
			EnableTransparencyControl = true;
			ShowAll ();
		}
开发者ID:rajeshpillai,项目名称:monodevelop,代码行数:33,代码来源:ParameterInformationWindow.cs


示例7: SplashScreenForm

		//this is a popup so it behaves like other splashes on Windows, i.e. doesn't show up as a second window in the taskbar.
		public SplashScreenForm () : base (Gtk.WindowType.Popup)
		{
			AppPaintable = true;
			this.Decorated = false;
			this.WindowPosition = WindowPosition.Center;
			this.TypeHint = Gdk.WindowTypeHint.Splashscreen;
			try {
				using (var stream = BrandingService.GetStream ("SplashScreen.png", true))
					bitmap = new Gdk.Pixbuf (stream);
			} catch (Exception e) {
				LoggingService.LogError ("Can't load splash screen pixbuf 'SplashScreen.png'.", e);
			}
			progress = new ProgressBar();
			progress.Fraction = 0.00;
			progress.HeightRequest = 6;

			vbox = new VBox();
			vbox.BorderWidth = 12;
			label = new Gtk.Label ();
			label.UseMarkup = true;
			label.Xalign = 0;
			vbox.PackEnd (progress, false, true, 0);
			vbox.PackEnd (label, false, true, 3);
			this.Add (vbox);
			if (bitmap != null)
				this.Resize (bitmap.Width, bitmap.Height);
		}
开发者ID:nieve,项目名称:monodevelop,代码行数:28,代码来源:SplashScreen.cs


示例8: BDialog

        public BDialog(string aName, Gtk.Window aParent, string aText)
            : base(aName, aParent, Gtk.DialogFlags.NoSeparator)
        {
            // setup dialog
              this.Modal = true;
              this.BorderWidth = 6;
              this.HasSeparator = false;
              this.Resizable = false;
              this.VBox.Spacing=12;

              // graphic items
              hbox = new Gtk.HBox();
              		Gtk.VBox labelBox = new VBox();
              		label = new Gtk.Label();
              		image = new Gtk.Image();

            hbox.Spacing=12;
            hbox.BorderWidth=6;
            this.VBox.Add(hbox);

            // set-up image
            image.Yalign=0.0F;
              hbox.Add(image);

            // set-up label
            label.Yalign=0.0F;
            label.Xalign=0.0F;
            label.UseMarkup=true;
            label.Wrap=true;
            label.Markup=aText;

            // add to dialog
            labelBox.Add(label);
            hbox.Add(labelBox);
        }
开发者ID:BackupTheBerlios,项目名称:beline-svn,代码行数:35,代码来源:Dialogs.cs


示例9: IndexInfo

		public IndexInfo ()
		{
			HeaderIcon = Beagle.Util.WidgetFu.LoadThemeIcon ("dialog-information", 48);
			Header = Catalog.GetString ("Index Information");

			Gtk.Label description = new Gtk.Label ();
			description.Markup = Catalog.GetString ("Number of items currently indexed:");
			description.LineWrap = true;
			description.Justify = Justification.Left;
			description.SetAlignment (0.0f, 0.5f);

			Append (description, Gtk.AttachOptions.Fill, 0);

			label = new Gtk.Label ();
			label.LineWrap = true;
			label.SetAlignment (0.0f, 0.5f);
			label.Justify = Justification.Fill;
			
			Append (label, Gtk.AttachOptions.Expand | Gtk.AttachOptions.Fill, 0);

			note = new Gtk.Label ();
			note.Markup = Catalog.GetString ("<i>NOTE: The search service is still indexing new data.</i>");
			note.LineWrap = true;
			note.Justify = Justification.Fill;
			note.SetAlignment (0.0f, 0.5f);
			note.NoShowAll = true;
			
			Append (note, Gtk.AttachOptions.Fill, 0);
		}
开发者ID:ArsenShnurkov,项目名称:beagle-1,代码行数:29,代码来源:IndexInfo.cs


示例10: set_snippet

 public void set_snippet(string snippet)
 {
     snippet_wrapper = new Gtk.EventBox();
     Gtk.Label tmp = new Gtk.Label();
     tmp.Markup = snippet;
     snippet_wrapper.Add(tmp);
 }
开发者ID:GNOME,项目名称:nemo,代码行数:7,代码来源:DisplayDocumentItem.cs


示例11: DummyPreferences

 public DummyPreferences()
     : base()
 {
     var lbl = new Label ("Debugging System (this message is a test)");
     PackStart (lbl, true, true, 0);
     ShowAll ();
 }
开发者ID:GNOME,项目名称:tasque,代码行数:7,代码来源:DummyPreferences.cs


示例12: ProgressDialog

        public ProgressDialog(string title, CancelButtonType cancel_button_type, int total_count, Gtk.Window parent_window)
        {
            Title = title;
            this.total_count = total_count;

            if (parent_window != null)
                this.TransientFor = parent_window;

            HasSeparator = false;
            BorderWidth = 6;
            SetDefaultSize (300, -1);

            message_label = new Label (String.Empty);
            VBox.PackStart (message_label, true, true, 12);

            progress_bar = new ProgressBar ();
            VBox.PackStart (progress_bar, true, true, 6);

            switch (cancel_button_type) {
            case CancelButtonType.Cancel:
                button = (Gtk.Button)AddButton (Gtk.Stock.Cancel, (int) ResponseType.Cancel);
                break;
            case CancelButtonType.Stop:
                button = (Gtk.Button)AddButton (Gtk.Stock.Stop, (int) ResponseType.Cancel);
                break;
            }

            Response += new ResponseHandler (HandleResponse);
        }
开发者ID:iainlane,项目名称:f-spot,代码行数:29,代码来源:ProgressDialog.cs


示例13: TopBar

        // create the TopBar widget
        public TopBar()
        {
            // create the widgets
            Button add_button = new Button (Stock.Add);
            Button remove_button = new Button (Stock.Remove);
            Label search_label = new Label ("Search:");

            Image clear_image = new Image (Stock.Clear, IconSize.Menu);
            clear_box.Add (clear_image);

            // hook up the widget events
            add_button.Clicked += add_clicked;
            remove_button.Clicked += remove_clicked;
            search.Changed += search_changed;
            clear_box.ButtonReleaseEvent += clear_released;
            clear_box.Realized += clear_realized;

            // homogeneous button box
            HBox button_box = new HBox (true, 0);
            button_box.PackStart (add_button, false, true, 0);
            button_box.PackStart (remove_button, false, true, 0);

            // pack widgets
            this.PackStart (button_box, false, true, 0);
            this.PackStart (search_label, false, false, 5);
            this.PackStart (search, true, true, 0);
            this.PackStart (clear_box, false, false, 0);
        }
开发者ID:gsterjov,项目名称:fusemc,代码行数:29,代码来源:TopBar.cs


示例14: BuildLayout

        void BuildLayout ()
        {
            primary_vbox = new VBox ();
            
            var label = new Label ("Super duper test UI!");
            label.Show ();
            primary_vbox.Add (label);
            
            var button_box = new HButtonBox ();
            button_box.Show ();
            primary_vbox.Add (button_box);
            
            var folder_button = new FileChooserButton ("Select import folder", FileChooserAction.SelectFolder);
            folder_button.FileSet += delegate {
                folder = folder_button.Uri;
                Log.Information ("Selected " + folder);
            };
            folder_button.Show ();
            button_box.Add (folder_button);
            
            var import_button = new Button { Label = "Start Import" };
            import_button.Activated += StartImport;
            import_button.Clicked += StartImport;
            import_button.Show ();
            button_box.Add (import_button);

            primary_vbox.Show ();
            Add (primary_vbox);
        }
开发者ID:tigger,项目名称:tripod,代码行数:29,代码来源:MainWindow.cs


示例15: AddMessage

		public void AddMessage (string msg, IconId icon)
		{
			if (lastImage != null) {
				HSeparator sep = new HSeparator ();
				sep.Show ();
				msgBox.PackStart (sep, false, false, 0);
				lastImage.IconSize = Gtk.IconSize.Menu;
			}
			
			HBox box = new HBox ();
			box.Spacing = 12;
			Alignment imgBox = new Alignment (0, 0, 0, 0);
			var img = new ImageView (icon, lastImage != null ? Gtk.IconSize.Menu : IconSize.Dialog);
			imgBox.Add (img);
			lastImage = img;
			box.PackStart (imgBox, false, false, 0);
			Label lab = new Label (msg);
			lab.UseUnderline = false;
			lab.Xalign = 0;
			lab.Yalign = 0;
			lab.Wrap = true;
			lab.WidthRequest = 500;
			box.PackStart (lab, true, true, 0);
			msgBox.PackStart (box, false, false, 0);
			box.ShowAll ();
		}
开发者ID:FreeBSD-DotNet,项目名称:monodevelop,代码行数:26,代码来源:MultiMessageDialog.cs


示例16: Fill

		public void Fill (SolutionFolder parentCombine, SolutionItem entry, ISolutionItemFeature[] features)
		{
			selectedFeatures.Clear ();
			selectedEditors.Clear ();
			
			this.entry = entry;
			this.parentCombine = parentCombine;
			
			foreach (Gtk.Widget w in box.Children) {
				box.Remove (w);
				w.Destroy ();
			}
			// Show enabled features at the beginning
			foreach (ISolutionItemFeature feature in features)
				if (feature.GetSupportLevel (parentCombine, entry) == FeatureSupportLevel.Enabled) {
					Gtk.Widget editor = AddFeature (feature);
					selectedFeatures.Add (feature);
					selectedEditors.Add (editor);
				}
			foreach (ISolutionItemFeature feature in features)
				if (feature.GetSupportLevel (parentCombine, entry) != FeatureSupportLevel.Enabled)
					AddFeature (feature);
			
			if (box.Children.Length == 0) {
				// No features
				Label lab = new Label ();
				lab.Xalign = 0;
				lab.Text = GettextCatalog.GetString ("There are no additional features available for this project.");
				box.PackStart (lab, false, false, 0);
				lab.Show ();
			}
			scrolled.AddWithViewport (box);
		}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:33,代码来源:CombineEntryFeatureSelector.cs


示例17: NodeEditorWidget

		public NodeEditorWidget (DotNetProject project, AddinRegistry reg, ExtensionNodeType ntype, AddinDescription parentAddinDescription, string parentPath, ExtensionNodeDescription node)
		{
			this.node = node;
			this.project = project;
			tips = new Tooltips ();
			Spacing = 0;
			
			// Header
			
			Label label = new Label ();
			label.Wrap = true;
			label.WidthRequest = 480;
			string txt = "<b>" + node.NodeName + "</b>";
			if (ntype.Description.Length > 0)
				txt += "\n" + GLib.Markup.EscapeText (ntype.Description);
			label.Markup = txt;
			label.Xalign = 0f;
			PackStart (label, false, false, 6);
			PackStart (new HSeparator (), false, false, 0);
			
			// Attributes
			
			grid = new PropertyGrid ();
			grid.CurrentObject = new NodeWrapper (project, reg, ntype, parentAddinDescription, parentPath, node);
			
			PackStart (grid, true, true, 0);
			
			ShowAll ();
			
			grid.ShowHelp = true;
			grid.ShowToolbar = false;
			
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:33,代码来源:NodeEditorWidget.cs


示例18: creaVentanaArticulo

        public void creaVentanaArticulo()
        {
            titulo="Añadir articulo";
            ventana(titulo);
            Label cat=new Label("Introduce el nombre del nuevo articulo: ");
            text= new Entry();
            ComboBox cb=new ComboBox();
            Label cat2=new Label("Selecciona la categoria: ");
            combot= new ComboBoxHelper(App.Instance.DbConnection,cb,"nombre","id",0,"categoria");
            tabla.Attach(cat,0,1,0,1);
            tabla.Attach(text,1,2,0,1);
            tabla.Attach(cat2,0,1,1,2);
            tabla.Attach(cb,1,2,1,2);
            Label pre=new Label("Introduce el precio del nuevo articulo: ");
            precio=new Entry();
            tabla.Attach(pre,0,1,2,3);
            tabla.Attach(precio,1,2,2,3);
            Button button=new Button("Añadir");
                    button.Clicked +=delegate{
                    añadirArticulo(App.Instance.DbConnection);
                    if(!enBlanco){
                        window.Destroy();
                        refresh();
                }
            };

            tabla.Attach(button,1,2,3,4);
            window.Add(vbox);
            window.ShowAll();
        }
开发者ID:nerea123,项目名称:ad,代码行数:30,代码来源:ArticuloListView.cs


示例19: ParameterInformationWindow

        public ParameterInformationWindow()
        {
            desc = new Gtk.Label ("");
            desc.Xalign = 0;
            desc.Wrap = true;
            count = new Gtk.Label ("");

            mainBox = new HBox (false, 2);
            mainBox.BorderWidth = 3;

            HBox arrowHBox = new HBox ();

            goPrev = new Gtk.Arrow (Gtk.ArrowType.Up, ShadowType.None);
            arrowHBox.PackStart (goPrev, false, false, 0);
            arrowHBox.PackStart (count, false, false, 0);
            goNext = new Gtk.Arrow (Gtk.ArrowType.Down, ShadowType.None);
            arrowHBox.PackStart (goNext, false, false, 0);

            VBox vBox = new VBox ();
            vBox.PackStart (arrowHBox, false, false, 0);

            mainBox.PackStart (vBox, false, false, 0);
            mainBox.PackStart (desc, true, true, 0);
            mainBox.ShowAll ();
            this.Add (mainBox);

            EnableTransparencyControl = true;
        }
开发者ID:moscrif,项目名称:ide,代码行数:28,代码来源:ParameterInformationWindow.cs


示例20: addNewTab

 public void addNewTab(String name, IElement element)
 {
     Label tablabel = new Label(name);
     this.AppendPage((Widget)element,tablabel);
     this.ShowAll();
     TabCount++;
 }
开发者ID:sanmadjack,项目名称:LAUNCH,代码行数:7,代码来源:Tabs.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Gtk.ListStore类代码示例发布时间:2022-05-26
下一篇:
C# Gtk.KeyReleaseEventArgs类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap