[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

tkmessage box

Jason

7/5/2007 11:05:00 PM

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.

--
Posted via http://www.ruby-....

1 Answer

Morton Goldberg

7/6/2007

0

On Jul 5, 2007, at 7:05 PM, Jason wrote:

> 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.

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