Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

(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

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

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://161716]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2018-01-22 08:45 GMT
Find Nodes?
    Voting Booth?
    How did you see in the new year?

    Results (233 votes). Check out past polls.