On Fri, 31 May 2019 10:37:16 +0200, Mike Wey wrote:
I've made some headway...
By adding a setSizeRequest() call to the MyScrolledWindow class:
class MyScrolledWindow : ScrolledWindow
{
FontTreeView fontTreeView;
this()
{
fontTreeView = new FontTreeView();
super();
setSizeRequest(500, 400);
add(fontTreeView);
} // this()
} // class MyScrolledWindow
I managed to get a reasonably-sized scrolled window with all fonts presented in the TreeView.
But I'm still getting these errors that I'm at a loss to explain or track down:
(treeview_dynamic_fill_with_scrolled_window.exe:10124): Gtk-CRITICAL **: gtk_cell_layout_add_attribute: assertion 'GTK_IS_CELL_LAYOUT (cell_layout)' failed
(treeview_dynamic_fill_with_scrolled_window.exe:10124): Gtk-WARNING **: Allocating size to GtkWindow 0000015ae0d2ae40 without calling gtk_widget_get_preferred_width/height(). How does the code know the size to allocate?
I'm still banging away, though.
A question about the last error...
If I were to getPreferredWidth/Height, what would I then do with these values? I've found nothing in the docs about this.