Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
There's more than one way to do things
 
PerlMonks  

(ichi) Re: tk question: strick app cann't close by clicking

by ichimunki (Priest)
on Apr 24, 2002 at 18:31 UTC ( #161716=note: print w/ replies, xml ) Need Help??


in reply to tk question: strick app cann't close by clicking

You can't find it because it probably does not exist. :)

The "decorations" in title bars are typically the responsibility of the window manager (which you may or may not have much control over-- especially with Tk). Reading the perldoc for Tk::Wm we find a $toplevel->wrapper() method which will give some info about the window holding this Toplevel widget. We also find that there is a Tk::Mwm module for manipulating the Motif window manager, which does have methods for controlling decorations, but may or may not suffice when running other wms, like KDE or Sawfish or Windows (some of these may have their own modules).

What you can do to avoid the user sidestepping your dialog box by clicking the close button is arrange a variable to be set by the button you want the user to use. If that variable is not set correctly when the dialog closes, simply re-open the dialog (with an optional stern warning to use the button this time). This will prevent those of us using window managers that support various destroy methods from getting around the lack of a close button as well.


Comment on (ichi) Re: tk question: strick app cann't close by clicking
Re: (ichi) Re: tk question: strick app cann't close by clicking
by benlaw (Scribe) on Apr 24, 2002 at 19:29 UTC
    thx for ichimunki
    oh :( doesn't exist , feel sad ar~
    because my program only have 1 page , I should use MainWindow instead of Dialog box
    thx...~

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://161716]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2014-04-17 02:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (437 votes), past polls