Re: Composite Widget Focus handling



On Thu, 2004-12-30 at 13:00 +0200, Risto Kivilahti wrote:
> Hi,
> 
> I hope this is the right place to mail, if not just move this were it 
> belongs.
> 
> Scenario:
> Building a composite widget (parent class == container). User of the 
> widget would use/see the widget as one entity. (Similar to Combobox)
> 
> If the CAN_FOCUS flag is unset, I can not call grab focus.
> 
> If the CAN_FOCUS flag is set, the focus goes to the container it self 
> and not for one of the childs.
> 
> I would like to call grab focus for the composite widget and see that 
> the focus would be passed for one of the childs.
> 
> How should I handle this situation in Gtk+?

I think what you are asking for is that gtk_widget_grab_focus() on
the parent should move the focus to one of the children? Basically,
that's not possible... you can't do much better than to have a
custom method to call gtk_widget_grab_focus().
[e.g. _gtk_file_chooser_embed_initial_focus()]

You can determine what widget gets focused on focus in with the
keyboard by overriding the focus() virtual method.

I don't think there is a bug in bugzilla for this issue, so you might
want to file one.

Regards,
					Owen

Attachment: signature.asc
Description: This is a digitally signed message part



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