Search code examples
cgridgtkpositiongtk3

How to put a widget into any column inside a grid?


I'm writing by hand an application that use Gtk+. I'm using a GtkGrid to hold my GtkWidgets, but I can't put a GtkWidget into specific colum, as the second parameter of gtk_grid_attach() function says. E.g, the last element was placed into the 4-column, if I try to put into the 6-column it does not works; the GtkWidget is auto placed by the gtk into the 5-column.


Solution

  • If all you want is to have some blank space between the widgets, you should be able to achieve that with someting simpler. Like a plain GtkBox, and using the padding support when adding the widgets.