Re: help_focus_widget



It would probably be better to take this question to
gtk-app-devel-list (see
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list).

Cheers,
Elijah

On 5/2/05, Ashok jain <mrec123 ashok gmail com> wrote:
> I have created a widget by using gtk APIs like this:
> 
> //Window creation
>         setupmenu_window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
>         gtk_object_set_data (GTK_OBJECT (setupmenu_window),
> "setupmenu_window", setupmenu_window);
>         gtk_widget_set_usize (setupmenu_window, WIN_WIDTH, WIN_HEIGHT);
>         GTK_WIDGET_SET_FLAGS (setupmenu_window, GTK_CAN_FOCUS);
>         gtk_window_set_title (GTK_WINDOW (setupmenu_window), _("Setup Menu"));
> 
> //Fixed window
>         setupmenu_fixed = gtk_fixed_new ();
>         gtk_widget_ref (setupmenu_fixed);
>         gtk_object_set_data_full (GTK_OBJECT (setupmenu_window),
> "setupmenu_fixed", setupmenu_fixed,
>                 (GtkDestroyNotify) gtk_widget_unref);
>         gtk_widget_show (setupmenu_fixed);
>         gtk_container_add (GTK_CONTAINER (setupmenu_window), setupmenu_fixed);
>         gtk_widget_set_uposition (setupmenu_fixed, 0, 0);
>         gtk_widget_set_usize (setupmenu_fixed, WIN_WIDTH, WIN_HEIGHT);
>         GTK_WIDGET_SET_FLAGS (setupmenu_fixed, GTK_CAN_FOCUS);
> 
> //Label widget creation
> 
>         mcolor_label = gtk_label_new (_("Matte color"));
>         gtk_label_set_font(GTK_LABEL(mcolor_label), FONTTYPE1);
>         gtk_label_set_txtColor(GTK_LABEL(mcolor_label),
> label_disable_color1.pixel, label_disable_color1.red,
> label_disable_color1.green, label_disable_color1.blue);
>         gtk_label_set_bgColor(GTK_LABEL(mcolor_label),
> highlight_bg_color.pixel, highlight_bg_color.red,
> highlight_bg_color.green, highlight_bg_color.blue);
>         gtk_widget_ref (mcolor_label);
>         gtk_object_set_data_full (GTK_OBJECT (setupmenu_window),
> "mcolor_label", mcolor_label,
>                 (GtkDestroyNotify) gtk_widget_unref);
>         gtk_widget_show (mcolor_label);
>         gtk_fixed_put (GTK_FIXED (setupmenu_fixed), mcolor_label,
> SETUP_RIGHT_LABEL_POSX, SETUP_RIGHT_LABEL1_POSY);
>         gtk_widget_set_uposition (mcolor_label, SETUP_RIGHT_LABEL_POSX,
> SETUP_RIGHT_LABEL1_POSY);
>         gtk_widget_set_usize (mcolor_label, SETUP_RIGHT_LABEL_WIDTH,
> SETUP_RIGHT_LABEL_HEIGHT);
>         gtk_label_set_alpha(GTK_LABEL(mcolor_label),255);
>         gtk_misc_set_alignment (GTK_MISC (mcolor_label), 0.08, 0.57/RATIO);
> 
> How can I get a yellow rectangle around above label if I focus that?
> _______________________________________________
> desktop-devel-list mailing list
> desktop-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/desktop-devel-list
>



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