How to get GtkNotebook page child

Hi,
in Gtk4 I need to get the child widget of a GtkNotebook page and cannot figure out how to do it.
I can get the page number with gtk_notebook_get_current_page(), and this returns the index of the page, int value.
There is a function I found in help: GtkWidget* gtk_notebook_page_get_child (GtkNotebookPage* page); but it takes as parameter a pointer to GtkNotebookPage, while I only have the index of the page.
I could not find more in the help pages.
By child widget i mean the page content.

Isn’t it Gtk.Notebook.get_nth_page ?

Use gtk_notebook_get_nth_page() if you have an index, or use gtk_notebook_get_pages() to get a list model if you want to iterate over all the pages inside the notebook widget.

Great! Thank you! Long live GTK! (for the min. 20 chars reply :wink:)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.