Re: unset GTK_CAN_FOCUS on CList titles



On Wed, Jan 10, 2001 at 12:26:45AM +0100, DaP wrote:

 how can I unset the GTK_CAN_FOCUS flag on CList titles?  my code seems
like:

clist_left = gtk_clist_new (6);
gtk_clist_column_titles_show (GTK_CLIST (clist_left)); 
hbox_left_name = gtk_hbox_new (FALSE, 0); 
gtk_clist_set_column_widget (GTK_CLIST (clist_left), 0, hbox_left_name);
label_left_name = gtk_label_new (_("Name")); 
gtk_box_pack_start (GTK_BOX (hbox_left_name), label_left_name, TRUE, TRUE,
0);
GTK_WIDGET_UNSET_FLAGS (hbox_left_name, GTK_CAN_FOCUS);
GTK_WIDGET_UNSET_FLAGS (label_left_name, GTK_CAN_FOCUS);

..but it doesn't works, titles always gets the keyboard focus..


gtk_clist_set_column_widget() places the widget arg into a GtkButton.
try:

    GtkCListColumn column;
    ...
    column = GTK_CLIST(clist_left)->column[0];
    GTK_WIDGET_UNSET_FLAGS (column.button, GTK_CAN_FOCUS);
    ...

and depending on what it is you're trying to do (make it unclickable as well?)

    gtk_widget_set_sensitive (column.button, FALSE);


thanks,
--
  DaP



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




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