Beefy Boxes and Bandwidth Generously Provided by pair Networks Cowboy Neal with Hat
Just another Perl shrine
 
PerlMonks  

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

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

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


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

Replies are listed 'Best First'.
Re: (ichi) Re: tk question: strick app cann't close by clicking
by benlaw (Scribe) on Apr 24, 2002 at 15: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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://161716]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.