public NotebookTabLabel(string title)
        {
            Button button = new Button ();
            button.Image = new Gtk.Image (Stock.Close, IconSize.Menu);
            button.TooltipText = "Close Tab";
            button.Relief = ReliefStyle.None;

            RcStyle rcStyle = new RcStyle ();
            rcStyle.Xthickness = 0;
            rcStyle.Ythickness = 0;
            button.ModifyStyle (rcStyle);

            button.FocusOnClick = false;
            button.Clicked += OnCloseClicked;
            button.Show ();

            Label label = new Label (title);
            label.UseMarkup = false;
            label.UseUnderline = false;
            label.Show ();

            HBox hbox = new HBox (false, 0);
            hbox.Spacing = 0;
            hbox.Add (label);
            hbox.Add (button);
            hbox.Show ();

            this.Add (hbox);
        }
Beispiel #2
0
 static void Merge_cb(IntPtr inst, IntPtr src)
 {
     try {
         RcStyle __obj = GLib.Object.GetObject(inst, false) as RcStyle;
         __obj.OnMerge(GLib.Object.GetObject(src) as Gtk.RcStyle);
     } catch (Exception e) {
         GLib.ExceptionManager.RaiseUnhandledException(e, false);
     }
 }
Beispiel #3
0
 static IntPtr CreateRcStyle_cb(IntPtr inst)
 {
     try {
         RcStyle     __obj = GLib.Object.GetObject(inst, false) as RcStyle;
         Gtk.RcStyle __result;
         __result = __obj.OnCreateRcStyle();
         return(__result == null ? IntPtr.Zero : __result.Handle);
     } catch (Exception e) {
         GLib.ExceptionManager.RaiseUnhandledException(e, true);
         // NOTREACHED: above call does not return.
         throw e;
     }
 }
		public TabLabel(string text, Notebook _nb) {
			Button btn = new Button();
			RcStyle rcStyle = new RcStyle ();
			rcStyle.Xthickness = 0;
			rcStyle.Ythickness = 0;
			btn.ModifyStyle (rcStyle);
			btn.Image = new Image(Stock.Close, IconSize.Menu);
			PackStart(TextLabel = new Label(text), true, true, 1);
			PackStart(btn, false, false, 0);
			CloseButton = btn;
			
			nb = _nb;
			//tabWidget = _tabWidget;
			
			CloseButton.Clicked += new EventHandler(OnCloseButtonClick);
			
			ShowAll();
		}