예제 #1
0
 private void boton(string nombre, string label, string imagen)
 {
     Gtk.Button boton = new global::Gtk.Button ();
     boton.CanFocus = true;
     boton.Name = nombre;
     boton.UseUnderline = true;
     // Container child btnNuevo.Gtk.Container+ContainerChild
     global::Gtk.Alignment w1 = new global::Gtk.Alignment (0.5f, 0.5f, 0f, 0f);
     // Container child GtkAlignment.Gtk.Container+ContainerChild
     global::Gtk.HBox w2 = new global::Gtk.HBox ();
     w2.Spacing = 2;
     // Container child GtkHBox.Gtk.Container+ContainerChild
     /*global::Gtk.Image w3 = new global::Gtk.Image ();
     w3.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, imagen, global::Gtk.IconSize.Button);
     w2.Add (w3);
     Este era el boton nuevo*/
     // Container child GtkHBox.Gtk.Container+ContainerChild
     global::Gtk.Label w5 = new global::Gtk.Label ();
     w5.LabelProp = global::Mono.Unix.Catalog.GetString (label);
     w5.UseUnderline = true;
     w2.Add (w5);
     w1.Add (w2);
     boton.Add (w1);
     this.fixed2.Add (boton);
     global::Gtk.Fixed.FixedChild w9 = ((global::Gtk.Fixed.FixedChild)(this.fixed2[boton]));
     w9.X = this.x;
     w9.Y = this.y - 10;
     if(imagen == "gtk-file")//linea que aniade el evento a los botones dinamicos
         boton.Clicked += new global::System.EventHandler (this.OnfileClicked);
 }
예제 #2
0
 private void boton(string nombre, string label, string imagen)
 {
     Gtk.Button boton = new global::Gtk.Button ();
     boton.CanFocus = true;
     boton.Name = nombre;
     boton.UseUnderline = true;
     // Container child btnNuevo.Gtk.Container+ContainerChild
     global::Gtk.Alignment w1 = new global::Gtk.Alignment (0.5f, 0.5f, 0f, 0f);
     // Container child GtkAlignment.Gtk.Container+ContainerChild
     global::Gtk.HBox w2 = new global::Gtk.HBox ();
     w2.Spacing = 2;
     // Container child GtkHBox.Gtk.Container+ContainerChild
     global::Gtk.Image w3 = new global::Gtk.Image ();
     //w3.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, imagen, global::Gtk.IconSize.Button);
     w2.Add (w3);
     // Container child GtkHBox.Gtk.Container+ContainerChild
     global::Gtk.Label w5 = new global::Gtk.Label ();
     w5.LabelProp = global::Mono.Unix.Catalog.GetString (label);
     w5.UseUnderline = true;
     w2.Add (w5);
     w1.Add (w2);
     boton.Add (w1);
     this.fixed1.Add (boton);
     global::Gtk.Fixed.FixedChild w9 = ((global::Gtk.Fixed.FixedChild)(this.fixed1[boton]));
     w9.X = this.x;
     w9.Y = this.y - 10;
 }
예제 #3
0
파일: TabLabel.cs 프로젝트: aaberg/DbUtils
        private void Init()
        {
            this.Spacing = 5;

            this.CanFocus = true;

            // icon
            var icon = Gtk.Image.NewFromIconName(Gtk.Stock.File, Gtk.IconSize.Menu);
            this.PackStart(icon, true, true, 0);

            // label
            var Label = new global::Gtk.Label(this.LabelText);
            this.PackStart (Label, true, true, 0);

            // Close button
            var closeBtn = new global::Gtk.Button();
            closeBtn.Relief = Gtk.ReliefStyle.None;
            closeBtn.FocusOnClick = false;
            closeBtn.Add(Gtk.Image.NewFromIconName(Gtk.Stock.Close, Gtk.IconSize.Menu));
            closeBtn.BorderWidth = 0;
            closeBtn.Clicked += (sender, e) => OnCloseClicked();

            this.PackStart(closeBtn, false, false, 0);

            this.ShowAll();
        }
예제 #4
0
파일: TabLabel.cs 프로젝트: aaberg/DbUtils
		private void Init() {
			this.Spacing = 5;

			this.CanFocus = true;

			// icon
			var icon = Gtk.Image.NewFromIconName(Gtk.Stock.File, Gtk.IconSize.Menu);
			this.PackStart(icon, true, true, 0);

			// label
			var Label = new global::Gtk.Label(this.LabelText);
			this.PackStart (Label, true, true, 0);

			// Close button
			var closeBtn = new global::Gtk.Button();
			closeBtn.Relief = Gtk.ReliefStyle.None;
			closeBtn.FocusOnClick = false;
			closeBtn.Add(Gtk.Image.NewFromIconName(Gtk.Stock.Close, Gtk.IconSize.Menu));
			closeBtn.BorderWidth = 0;
			closeBtn.Clicked += (sender, e) => OnCloseClicked();

			this.PackStart(closeBtn, false, false, 0);

			this.ShowAll();

		}
예제 #5
0
    private void boton(string nombre, string label, string imagen)
    {
        Gtk.Button boton = new global::Gtk.Button();
        boton.CanFocus     = true;
        boton.Name         = nombre;
        boton.UseUnderline = true;
        // Container child btnNuevo.Gtk.Container+ContainerChild
        global::Gtk.Alignment w1 = new global::Gtk.Alignment(0.5f, 0.5f, 0f, 0f);
        // Container child GtkAlignment.Gtk.Container+ContainerChild
        global::Gtk.HBox w2 = new global::Gtk.HBox();
        w2.Spacing = 2;
        // Container child GtkHBox.Gtk.Container+ContainerChild
        global::Gtk.Image w3 = new global::Gtk.Image();
        //w3.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, imagen, global::Gtk.IconSize.Button);
        w2.Add(w3);
        //Container child GtkHBox.Gtk.Container+ContainerChild
        global::Gtk.Label w5 = new global::Gtk.Label();
        w5.LabelProp    = global::Mono.Unix.Catalog.GetString(label);
        w5.UseUnderline = true;
        w2.Add(w5);
        w1.Add(w2);
        boton.Add(w1);
        this.fixed2.Add(boton);
        global::Gtk.Fixed.FixedChild w9 = ((global::Gtk.Fixed.FixedChild)(this.fixed2[boton]));
        w9.X = this.x;
        w9.Y = this.y - 10;



        if (imagen == "gtk-delete")
        {
            boton.Clicked += new global::System.EventHandler(this.OnDeleteClicked);
        }
        else if (imagen == "gtk-edit")
        {
            boton.Clicked += new global::System.EventHandler(this.OnEditClicked);
        }
        else if (imagen == "gtk-Ver")
        {
            boton.Clicked += new global::System.EventHandler(this.OnVerClicked);
        }
        else
        {
            boton.Clicked += new global::System.EventHandler(this.OnMailClicked);
        }
    }
예제 #6
0
    private void boton(string nombre, string label, string imagen)
    {
        Gtk.Button boton = new global::Gtk.Button ();
        boton.CanFocus = true;
        boton.Name = nombre;
        boton.UseUnderline = true;
        // Container child btnNuevo.Gtk.Container+ContainerChild
        global::Gtk.Alignment w1 = new global::Gtk.Alignment (0.5f, 0.5f, 0f, 0f);
        // Container child GtkAlignment.Gtk.Container+ContainerChild
        global::Gtk.HBox w2 = new global::Gtk.HBox ();
        w2.Spacing = 2;
        // Container child GtkHBox.Gtk.Container+ContainerChild
        global::Gtk.Image w3 = new global::Gtk.Image ();
        //w3.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, imagen, global::Gtk.IconSize.Button);
        w2.Add (w3);
        //Container child GtkHBox.Gtk.Container+ContainerChild
        global::Gtk.Label w5 = new global::Gtk.Label ();
        w5.LabelProp = global::Mono.Unix.Catalog.GetString (label);
        w5.UseUnderline = true;
        w2.Add (w5);
        w1.Add (w2);
        boton.Add (w1);
        this.fixed2.Add (boton);
        global::Gtk.Fixed.FixedChild w9 = ((global::Gtk.Fixed.FixedChild)(this.fixed2[boton]));
        w9.X = this.x;
        w9.Y = this.y - 10;

        if (imagen == "gtk-delete") {
            boton.Clicked += new global::System.EventHandler (this.OnDeleteClicked);
        } else if (imagen == "gtk-edit") {
            boton.Clicked += new global::System.EventHandler (this.OnEditClicked);
        } else if(imagen == "gtk-Ver"){
            boton.Clicked += new global::System.EventHandler (this.OnVerClicked);
        }
        else{

            boton.Clicked += new global::System.EventHandler(this.OnMailClicked);

        }
    }