handle box vs scale



The following program is behaving much differently that I was
expecting.  Basically, it's very difficult to change the scale
*without* having the handlebox break away.  

What am I missing?

--rich

#include <gtk/gtk.h>

int main (int argc, char *argv[])
{
  GtkWidget *w;
  GtkWidget *handlebox;
  GtkAdjustment *adjustment;
  GtkWidget *scale;

  gtk_init (&argc, &argv);

  w = gtk_window_new (GTK_WINDOW_TOPLEVEL);

  handlebox = gtk_handle_box_new ();
  gtk_container_add (GTK_CONTAINER (w), handlebox);
  gtk_widget_show (handlebox);

  adjustment = GTK_ADJUSTMENT (gtk_adjustment_new (0, 0, 101, 0.1, 1.0, 1.0));
  scale = gtk_vscale_new (adjustment);
  gtk_container_add (GTK_CONTAINER (handlebox), scale);
  gtk_widget_show (scale);

  gtk_widget_show (w);

  gtk_main ();
  return 0;
}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]