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


C# Gtk.Hide方法代码示例

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


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

示例1: AddTab

		public void AddTab (Gtk.Widget page, Gdk.Pixbuf icon, string label)
		{
			Tab tab = new Tab ();
			tab.SetLabel (page, icon, label);
			tab.ShowAll ();
			box.PackStart (tab, true, true, 0);
			if (currentTab == -1)
				CurrentTab = box.Children.Length - 1;
			else {
				tab.Active = false;
				page.Hide ();
			}
			
			tab.ButtonPressEvent += OnTabPress;
		}
开发者ID:transformersprimeabcxyz,项目名称:monodevelop-1,代码行数:15,代码来源:TabStrip.cs

示例2: UpdateButton

 void UpdateButton(DialogButton btn, Gtk.Button b)
 {
     if (!string.IsNullOrEmpty (btn.Label) && btn.Image == null) {
         b.Label = btn.Label;
     } else if (string.IsNullOrEmpty (btn.Label) && btn.Image != null) {
         var pix = btn.Image.ToImageDescription ();
         b.Image = new ImageBox (ApplicationContext, pix);
     } else if (!string.IsNullOrEmpty (btn.Label)) {
         Gtk.Box box = new Gtk.HBox (false, 3);
         var pix = btn.Image.ToImageDescription ();
         box.PackStart (new ImageBox (ApplicationContext, pix), false, false, 0);
         box.PackStart (new Gtk.Label (btn.Label), true, true, 0);
         b.Image = box;
     }
     if (btn.Visible)
         b.ShowAll ();
     else
         b.Hide ();
     b.Sensitive = btn.Sensitive;
     UpdateActionAreaVisibility ();
 }
开发者ID:jijamw,项目名称:xwt,代码行数:21,代码来源:DialogBackend.cs

示例3: UpdateButton

 void UpdateButton(DialogButton btn, Gtk.Button b)
 {
     if (!string.IsNullOrEmpty (btn.Label) && btn.Image == null) {
         b.Label = btn.Label;
     } else if (string.IsNullOrEmpty (btn.Label) && btn.Image != null) {
         var pix = (Gdk.Pixbuf) Toolkit.GetBackend (btn.Image);
         b.Image = new Gtk.Image (pix);
     } else if (!string.IsNullOrEmpty (btn.Label)) {
         Gtk.Box box = new Gtk.HBox (false, 3);
         var pix = (Gdk.Pixbuf) Toolkit.GetBackend (btn.Image);
         box.PackStart (new Gtk.Image (pix), false, false, 0);
         box.PackStart (new Gtk.Label (btn.Label), true, true, 0);
         b.Image = box;
     }
     if (btn.Visible)
         b.ShowAll ();
     else
         b.Hide ();
     b.Sensitive = btn.Sensitive;
     UpdateActionAreaVisibility ();
 }
开发者ID:garuma,项目名称:xwt,代码行数:21,代码来源:DialogBackend.cs

示例4: ExceptionWindow

        public ExceptionWindow(String name, Exception exp, Gtk.Window winToHide)
            : base("Exception Caught: " + name + " Must Close")
        {
            //e.Message
            //e.StackTrace
            //GLib.Markup.EscapeText(error)
            exception = exp;

            Gtk.VBox box = new Gtk.VBox(false, 5);

            box.PackStart(new Gtk.Label(name + " has thrown an exception and must close.\n" +
                    "This window contains exception information to\n" +
                    "assist the developer in fixing this bug."));

            //Style.LookupIconSet("Error")

              	Gtk.TextView messageView = new Gtk.TextView ();
            messageView.Buffer.Text = exception.Message;
            Gtk.ScrolledWindow messageViewSW = new Gtk.ScrolledWindow();
            messageViewSW.HscrollbarPolicy = Gtk.PolicyType.Automatic;
            messageViewSW.VscrollbarPolicy = Gtk.PolicyType.Automatic;
            messageViewSW.ShadowType = Gtk.ShadowType.In;
            messageViewSW.Add(messageView);

              	Gtk.TextView traceView = new Gtk.TextView ();
            traceView.Buffer.Text = exception.StackTrace;
            Gtk.ScrolledWindow traceViewSW = new Gtk.ScrolledWindow();
            traceViewSW.HscrollbarPolicy = Gtk.PolicyType.Automatic;
            traceViewSW.VscrollbarPolicy = Gtk.PolicyType.Automatic;
            traceViewSW.ShadowType = Gtk.ShadowType.In;
            traceViewSW.Add(traceView);

            box.PackStart(messageViewSW);
            box.PackStart(new Gtk.HSeparator());
            box.PackStart(traceViewSW);

            Gtk.HBox buttonbox = new Gtk.HBox();

            Gtk.Button close = new Gtk.Button(Gtk.Stock.Close);
            close.UseStock = true;
            close.Clicked += onClose;

            Gtk.Button save = new Gtk.Button(Gtk.Stock.Save);
            save.UseStock = true;
            save.Clicked += onSave;
            save.Sensitive = false;

            buttonbox.PackStart(save);
            buttonbox.PackStart(close);

            box.PackStart(buttonbox);

            this.Add(box);

            this.Modal = true;

            if (winToHide != null)
            {
                winToHide.Hide();
            }

            this.SetSizeRequest(600,450);
            this.ShowAll();
            Application.Run();
        }
开发者ID:jcjones,项目名称:Gpremacy,代码行数:65,代码来源:ExceptionWindow.cs


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