[pygtk] problem with focus in notebook
Mike Bernson
mike at mlb.org
Thu Jun 4 20:52:08 WST 2009
Walter Leibbrandt wrote:
> Mike Bernson wrote:
>> I have a notebook that I want to control where the focus goes on page
>> switches.
>>
>> I connect to the switch-page signal.
>>
>> In the handle for the switch-page signal I set the focus to a Entry
>> widget. The
>> focus ends up on the tab for the page. If I call idle_add with
>> function to set the
>> focus to the Entry widget it works.
>>
>> I do not like using the idle_add to set the focus widget. It looks
>> like a hack and
>> I would like to find a better way to handle this.
>>
> How about using the "show" event of one of the widgets on the page? Like
> your "top"-level container (the page's child).
>
> HTH,
>
The show event does not happen on page switch event but when show or show_all is
called a widget. This happens at the wrong time.
More information about the pygtk
mailing list