[Gtk-sharp-list] Gtk.Button: resize internal padding

alessiofachechi alessio.fachechi at gmail.com
Tue Jun 23 09:53:20 EDT 2009


Hi, I'm creating a notebook widget with custom tab in which there is a close
button. The problem is that there is a padding between button border and the
contained icon image. How can I set it?

This is my code:


public partial class EditorTab: Gtk.HBox
{
	private Label Title_ = new Label("");
	
	public string Title
	{
		get { return Title_.Text.ToString(); }
		set { Title_.Text = value; }
	}
	
	public EditorTab()
	{
		HBox DocIconBox = new HBox(false, 4);
		Image DocIcon = new Image("gtk-file", IconSize.Menu);
		DocIconBox.PackStart(DocIcon);
		DocIconBox.PackStart(Title_);
		
		Button CloseButton = new Button();
		CloseButton.Relief = ReliefStyle.None;
		CloseButton.FocusOnClick = false;
		CloseButton.Image = new Image("gtk-close", IconSize.Menu);
		//CloseButton.Clicked += delegate {};
		
		this.PackStart(DocIconBox);
		this.PackStart(CloseButton);
		this.ShowAll();
	}
}


I add all the class code for information. The close button is "CloseButton".
I want to resize the padding like monodevelop tabs, firefox etc. How can I
do this?

Thanks..
-- 
View this message in context: http://www.nabble.com/Gtk.Button%3A-resize-internal-padding-tp24166514p24166514.html
Sent from the Mono - Gtk# mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20090623/ab0757a1/attachment.html 


More information about the Gtk-sharp-list mailing list