Re: I am failing to get a hide/show dialog to show more than once

Liste des GroupesRevenir à cl tcl 
Sujet : Re: I am failing to get a hide/show dialog to show more than once
De : mark (at) *nospam* qtrac.eu (Mark Summerfield)
Groupes : comp.lang.tcl
Date : 27. Jun 2024, 07:51:18
Autres entêtes
Message-ID : <5Pqdnbdjd8R7luD7nZ2dnZfqnPudnZ2d@brightview.co.uk>
References : 1 2
User-Agent : Pan/0.154 (Izium; 517acf4)
[snip]

Based on your idea of using winfo exists I've now refined the on_options
proc to this:

proc test::on_options {} {
    if {![winfo exists .optionsForm]} {
        puts "on_options init"
        toplevel .optionsForm
        set on_close [lambda {} {dialog hide .optionsForm}]
        wm title .optionsForm "Options — [tk appname]"
        ttk::label .optionsForm.label -text "Options go here"
        grid .optionsForm.label -row 0 -column 0
        ttk::button .optionsForm.closeButton -text Close -command
$on_close
        grid .optionsForm.closeButton -row 1 -column 0
        wm protocol .optionsForm WM_DELETE_WINDOW $on_close
        bind .optionsForm <Escape> $on_close
        dialog prepare .optionsForm
    }
    puts on_options
    dialog show .optionsForm
}

Date Sujet#  Auteur
26 Jun 24 * I am failing to get a hide/show dialog to show more than once5Mark Summerfield
26 Jun 24 `* Re: I am failing to get a hide/show dialog to show more than once4Ralf Fassel
27 Jun 24  +- Re: I am failing to get a hide/show dialog to show more than once1Mark Summerfield
27 Jun 24  `* Re: I am failing to get a hide/show dialog to show more than once2Mark Summerfield
27 Jun 24   `- Re: I am failing to get a hide/show dialog to show more than once1Ralf Fassel

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal