Re: Pixmaps and focus



"Ian King" <king eiffel com> writes:
> If I were to write a gtktext replacement using gtkpixmap, 

This is a totally weird thing to do, btw.

> 1) Letting the pixmap receive the focus when the user clicks on the
> editor.

Set the GTK_CAN_FOCUS flag, handle focus_in_event and focus_out_event, 
and gtk_widget_grab_focus() on button click.

> 2) Preventing the focus from leaving the widget on tab or arroy key press.

Return TRUE from your key_press_event handler when receiving those
events.

Havoc




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