Create a border abound a HBox/Any Widget

gtk, pygtk, python

Solution

Use a `gtk.Frame`:

import gtk

w = gtk.Window()
w.connect('destroy', lambda x: gtk.main_quit())
f = gtk.Frame()
b = gtk.HBox()
f.add(b)
w.add(f)
w.show_all()

gtk.main()

Problem

How can I create a border around a box/any widget in gtk? When I say border I mean the light gray rounded rectangle you see in the image below: The functions I have attempted/looked for don't create a border, ie, set_border() creates a inner gap/padding around the widget. ``` b= gtk.VBox(False, 10) b.set_border(1) ```

Original source