Пример #1
0
        public Gtk.Button create_button(Gtk.Label label, Gtk.Image image)
        {
            Gtk.Button button = new Gtk.Button();
            Gtk.VBox   vbox   = new Gtk.VBox();

            label.WidthChars    = 24;
            label.MaxWidthChars = 24;
            label.LineWrap      = true;
            label.Justify       = Gtk.Justification.Center;

            vbox.Add(image);
            vbox.Add(label);
            button.Add(vbox);
            button.ShowAll();

            int h = 46 + label.SizeRequest().Height;

            if (h < 80)
            {
                h = 80;
            }

            button.SetSizeRequest(1, h);

            return(button);
        }
Пример #2
0
 public Gtk.Widget Render(INode node)
 {
     Gtk.Button button = new Gtk.Button();
     button.SetSizeRequest((int)node.Allocation.Width, (int)node.Allocation.Height);
     return(button);
 }
Пример #3
0
 public Gtk.Widget Render(INode node)
 {
     Gtk.Button button = new Gtk.Button();
     button.SetSizeRequest((int) node.Allocation.Width, (int) node.Allocation.Height);
     return button;
 }