Re: Combobox focus event




Another thing to give a try is just to set a boolean in the "set-focus-child" callback. Not sure if this will 
always work. I think that it should. 

I don't know the best workaround for the "focus-in-event" in a combo box. It isn't obvious how to connect 
that signal for the combobox.

Eric


gboolean combo_focus=FALSE;
g_signal_connect(combo, "set-focus-child", G_CALLBACK(focus_combo_container), &combo_focus);
...
static void focus_combo_container(GtkContainer *container, GtkWidget *widget, gboolean *combo_focus)
  {
    if(*combo_focus) 
      {
        g_print("Combo Container Focus Out\n");
        *combo_focus=FALSE;
      }
    else
      {
        g_print("Combo Container Focus In\n");
        *combo_focus=TRUE;
      }
  }



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