Relative Content

Tag Archive for cgtk4

How to drag and drop GtkWindow by holding on GtkNotebook header?

I am trying to move(drag & drop) GtkWindow by holding mouse click on Notebook header. But my problem is, due to the Drag & Drop EventController signal, other child widgets (button on tab) not working properly.
Can someone tell me how to properly implement the drag and drop window signal in the GtkNotebook header, without interrupting the child widgets.

How to drag and drop GtkWindow by holding on GtkNotebook header?

I am trying to move(drag & drop) GtkWindow by holding mouse click on Notebook header. But my problem is, due to the Drag & Drop EventController signal, other child widgets (button on tab) not working properly.
Can someone tell me how to properly implement the drag and drop window signal in the GtkNotebook header, without interrupting the child widgets.

How to scroll to the selected Item on GtkListView?

I want to use the GtkListView widget on my app. I’ve added some items to it. And, I have set an item as the default selected item of the GtkListView. But the problem is, while running the app, I can’t automatically scroll to the default selected item. Can anybody check it please?
The demo script is given below —

Theme parser errors when running GTK 4 demo code

The page Getting Started with GTK has an introductory GTK 4 code sample. I successfully compiled it. When I run the program, the window appears, but I’m getting a lot of Gtk-WARNING messages to stderr from the theme parser.

How to get parent window from a child widget in Gtk4?

In case of Gtk3, I used the function gtk_widget_get_parent_window to get the parent window from the child widget. But this function is not available in Gtk4. How to get parent window from a child widget in Gtk4?

How to show a Right click context menu on Gtk4?

I am trying to create a context menu, which will show in the Gtk4 window on mouse right click. In case of Gtk3 i used gtk_menu_popup_at_pointer(GTK_MENU(popup), event) function to show context menu, but this function is removed from gtk4. In Gtk4 How can this be done?