Dial widget tutorial



Hi Ian,

I've enjoyed your Gtk tutorial.  Thanks for putting it together.  

I've been trying to follow the Dial Widget section of the tutorial,
and have been successful in getting the gtkdial.h and gtkdial.c files
in what seems like working order.  I tried making a dial with the
following little program, and although a dial gets displayed, there is
no pointer displayed and mouse actions all seem to be ignored.  

I suspect that I've overlooked something that will be obvious to the
more experienced Gtk'ers, but I sure don't see what it is.  Can I ask
for a hint?

Program follows.  Message CC'd to gtk-list.
Thanks for the tutorial, and any advice that you'd care to offer.  

-- John Kodis.

#include <gtk/gtk.h>
#include "gtkdial.h"

int main(int argc, char *argv[])
{
  GtkWidget *window, *dial;
  gtk_init(&argc, &argv);

  window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
  dial = gtk_dial_new(NULL);

  gtk_container_add(GTK_CONTAINER(window), dial);

  gtk_widget_show(dial);
  gtk_widget_show(window);

  gtk_main();
  return 0;
}



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