Monday, April 11, 2011

Stacking GTK+ widgets

Is there a way to put GTK+ widgets in a stack? I.e. put a button over label so that button covers a part of label.

From stackoverflow
  • You'd have to use a Canvas control to explicitly set the positions of the controls - GTK+ works hard to not do what you're describing :)

  • Packing inside a GtkTable appears to allow this, though I didn't test very far - just juggled it in glade a little.

    I'm curious what you're looking to use this to achieve.

  • You can use GtkFixed as the layout. This will allow you to control exact locations of the child widgets, and they can overlap.

0 comments:

Post a Comment