Annoying space ... (attachment)



Oops. Here's the attachment.

-- 
Graham Ashton
#include <gtk/gtk.h>

void CloseTheApp ( GtkWidget * window, gpointer data )
{
  gtk_main_quit ();
}

gint main ( gint argc, gchar * argv[] )
{
  GtkWidget * window;
  GtkWidget * button;
  GtkWidget * hbox;
  
  gtk_init ( &argc, &argv );

  /* Create window */
  window = gtk_window_new ( GTK_WINDOW_TOPLEVEL );
  gtk_window_set_title ( GTK_WINDOW ( window ), "Check Buttons" );
  gtk_window_set_default_size ( GTK_WINDOW ( window ), 20, 20 );
  gtk_container_set_border_width ( GTK_CONTAINER ( window ), 20 );

  /* Create the button and add it into the window */
  hbox = gtk_hbox_new ( TRUE, (gint) NULL );
  button = gtk_check_button_new ();

  gtk_box_pack_start ( GTK_BOX ( hbox ), button, FALSE, FALSE, 0 );
  gtk_container_add ( GTK_CONTAINER ( window ), hbox );
  
  /* Connect up the window's signal handler */
  gtk_signal_connect ( GTK_OBJECT ( window ),
		       "destroy",
		       GTK_SIGNAL_FUNC ( CloseTheApp ),
		       NULL );

  /* Show the window */
  gtk_widget_show_all ( window );

  gtk_main ();
  return 0;
}





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