Remove Inner Border On Gtk.Button
I would like to remove border on a gtk.Button and also set its size fixed. How can I accomplish that? My button looks like that: b = gtk.Button() b.set_relief(gtk.RELIEF_NONE)
Solution 1:
You can use gtk.Widget.set_size_request to set a fixed size for the widget. Note that this is generally a bad idea, since the user may want a larger font size than you had planned for, etc.
As for removing the border, gtk.Button can often take up more space than you wish it would. You can try to set some of the style properties such as "inner-border" to 0 and see if that gets the result you want. If you need the smallest button possible, you should just gtk.Label inside a gtk.EventBox and handle clicks on the event box. That will use the least amount of pixels.
Solution 2:
I don't think the EventBox can send button events like "activated" and "clicked".
Post a Comment for "Remove Inner Border On Gtk.Button"