コード例 #1
0
ファイル: GtkSharpButton.cs プロジェクト: ventor3000/guppy
        private void CreateContent(Gtk.Image img)
        {
            if (button.Child != null)
            {
                button.Remove(button.Child);
            }


            Gtk.Box content = new Gtk.HBox();
            button.Add(content);
            content.Show();

            if (img != null)
            {
                content.Add(img);
            }


            if (label != null)
            {
                label = new Gtk.Label(label.Text);  //for some stupid reason we have to re-create it (why??)
                label.Show();
                content.Add(label);
            }
        }