Hello!!
I'm trying to add a hand1_cursor into my canvas window, with this code:

int main()
{
  GtkWidget *window;
  GtkWidget *vbox1;
  GtkWidget *scrollw1;
  GtkWidget *canvas;
  GtkWidget *event_box;
  
  GtkPlotCanvasChild *child;
  GdkColor color;
  gint page_width, page_height;
  gfloat scale = 1.;
   
  GtkTooltips *tooltips;
  tooltips=gtk_tooltips_new();
 
  page_width = GTK_PLOT_LETTER_W * scale;
  page_height = GTK_PLOT_LETTER_H * scale;
 
 /****************************Ventana que contiene
todo************************/
 
  window=gtk_window_new(GTK_WINDOW_TOPLEVEL);
  gtk_window_set_title(GTK_WINDOW(window), "GRECA_C_MATRIZ");
  gtk_widget_set_usize(window,950,450);
  gtk_container_border_width(GTK_CONTAINER(window),0);
   
  gtk_signal_connect (GTK_OBJECT (window), "destroy",
                     GTK_SIGNAL_FUNC (quit), NULL);
                     
  /**********Creacion de un eventbox asociado a la ventana grafica*********/
  
   event_box = gtk_event_box_new();
   gtk_container_add(GTK_CONTAINER(window),event_box);
   gtk_widget_show(event_box);
   
  /*****************caja vertical******************************************/ 
   
  vbox1=gtk_vbox_new(FALSE,0);
  gtk_container_add(GTK_CONTAINER(event_box),vbox1);
  gtk_widget_show(vbox1);

 /*********************Scroll**********************************************/
 
   scrollw1=gtk_scrolled_window_new(NULL, NULL);
   gtk_container_border_width(GTK_CONTAINER(scrollw1),0);
   gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrollw1),
                                GTK_POLICY_ALWAYS,GTK_POLICY_ALWAYS);
   gtk_box_pack_start(GTK_BOX(vbox1),scrollw1, TRUE, TRUE,0);
   gtk_widget_show(scrollw1);

/***********************Canvas***********************************************/

  canvas = gtk_plot_canvas_new(950, 450, 1.0);
  GTK_PLOT_CANVAS_SET_FLAGS(GTK_PLOT_CANVAS(canvas),
GTK_PLOT_CANVAS_DND_FLAGS);
  gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(scrollw1), canvas);
  gtk_box_pack_start(GTK_BOX(vbox1),canvas,FALSE,FALSE,0);
  gtk_widget_show(canvas);
  
/***********************Cursor************************************************/
  
  gtk_widget_realize(event_box);
  gdk_window_set_cursor(event_box->window,gdk_cursor_new(GDK_HAND1));



The problem is that when i add my canvas,this different cursor doesn't appear
 in my window.
Why??How can I do it???

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to