TKD set focus on window?
Gary Willoughby via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed May 14 13:43:18 PDT 2014
On Wednesday, 14 May 2014 at 17:08:21 UTC, Joakim wrote:
> Hi,
>
> Quick question regarding TKD (tkinter):
>
> Is there a way to set focus on the application window
> automatically on run? I'm on Mac OS X if that's of any
> importance.
>
> I have tried to grep the documentation but I can't find
> anything relevant.
>
> Thanks!
class App : TkdApplication
{
...
this.mainWindow.raise(); // <-- in UiElement
this.mainWindow.focus(); // <-- in UiElement
...
}
Window inherits from UiElement. Remember to look at the methods
in the parents of each class.
More information about the Digitalmars-d-learn
mailing list