How to drag GTKFixed widget

, ,

Hi,

I’m working on GTK3 application in cpp. I’m using GTKFixed as my container widgets and I want to drag my container. I did not find any reference that says we can drag GtkFixed.

How to make a GTKFixed dragable

Hi,

In gtk3 simple widgets like GtkFixed can’t catch mouse events directly (thus drag events).
You should wrap the GtkFixed in a GtkEventBox, and setup the drag source on it instead.

1 Like

Thankyou @gwillems , i was able to receive drag events. But during drag im not able to see the visuals of Widget being dragged. How to get that

Not sure about that, I never used that feature, but I think you have to use one of the “drag_set_icon_XXX” API, probably Gtk.drag_set_icon_widget or Gtk.drag_set_icon_surface or Gtk.drag_set_icon_pixbuf .

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