Forum: Ruby tkmessage box

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Jason (Guest)
on 2007-07-06 03:05
I have a TkRoot which opens a tktoplevel window:

 @toplevel.focus(true)
     @toplevel.set_grab
     @toplevel.wait_destroy  # same as top.tkwait_destroy
     @toplevel.release_grab

On my top level window I have a button which when clicked opens a
TkMessageBox. When the message box opens the TkRoot window comes back
into focus above the TopLevel window. How can I stop this from
happening? I want the TkMessageBox to be on top of the TopLevel window
which is on top of the TkRoot.
Morton G. (Guest)
on 2007-07-06 04:02
(Received via mailing list)
On Jul 5, 2007, at 7:05 PM, Jason wrote:

> happening? I want the TkMessageBox to be on top of the TopLevel window
> which is on top of the TkRoot.

I don't think you're posting enough information. You're forcing
anyone motivated to help you to do a whole lot of guessing. I
recommend that you post all your code. If you feel you can't do that,
at least post the sections containing the code that instantiates the
TkMessaageBox and the button callback code that pops it up. You need
to do more to help those who want to help you.

Having said that, I'll make a wild guess. Perhaps you didn't
construct the TkMessageBox by following the example Nagai san
provided recently for making modal child windows. I would think the
same rules apply to the TkMessageBox as to your Toplevel.

Regards, Morton
This topic is locked and can not be replied to.