Setting focus to newly shown window
- From: Johannes Bauer <dfnsonfsduifb gmx de>
- To: gtk-app-devel-list gnome org
- Subject: Setting focus to newly shown window
- Date: Tue, 19 Jan 2016 22:10:09 +0100
Hi list,
I've done some GTK programming in the ancient past and am just now
starting again with GTK3, Glade and pygtk. Wow, the project has come a
long way. It's absolutely amazing and so much simpler than in the past.
I love it.
But that aside, I do have a newbie question that I can't seem to figure
out: I have a main application and want to show a different top level
window (let's say it's a "info" window). When the window is opened, I
want it to show and give it the focus (so the user can press enter and
quickly close it down again). But I don't want it modal (it's okay if
the user changes the focus back to the main window and lets the "info"
window open).
I've tried set_focus() and grab_focus(), but both don't do what I expect
them to do. Surely this is insanely easy, but I couldn't find on the web
how it's done. Can someone give me a hand, please?
Thank you so much,
Cheers,
Johannes
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]