Forum: Poser Python Scripting


Subject: Making Dialog box stay on top (automatically return focus?)

Amadan opened this issue on Apr 16, 2009 · 3 posts


Amadan posted Thu, 16 April 2009 at 12:43 PM

So I have created a Tk widget in which you're required to select an output directory. If you press the action button (which performs renders) and you have not yet selected an output directory, it will pop up a warning dialog saying "You must choose an output directory!"

The problem is, after pressing "OK" to banish the warning dialog, my GUI disappears behind Poser's document window. I have to click it in the Windows taskbar or Alt+Tab to it to make it reappear.

Is there a way to make the application's focus automatically return to the main Tk  widget after it's spawned a warning dialog?

ETA: I've also noticed Poser is kind of flaky about displaying Python guis. Even when I do click on the widget in the taskbar, it seems to slow Poser down, take a long time to redraw after being moved, and sometimes I have to click it several times to make it reappear because it keeps disappearing behind the document window again. Is this typical?