From: Bryan Oakley on
On Feb 3, 4:07 am, Arjan <arjan.van.d...(a)rivm.nl> wrote:
> Hi!
>
> I have a development version of a gui that runs ahead of operational
> functionality of the programs that are activated by the gui. Therefore
> I would like to temporarily set certain portions of the gui to "-state
> disabled". It works when I e.g. add the flag "-state disabled" to a
> "checkbutton". The gui is organized in blocks:
>
> grid .puff_label -column 0 -row 0 -columnspan 7 -sticky nw
> grid\
> [::ttk::labelframe .general -text "General" ]\
> [::ttk::labelframe .release -text "Release" ]\
> [::ttk::labelframe .meteo -text "Meteo" ]\
> -sticky news
> grid\
> [::ttk::labelframe .run -text "Run" ]\
> [::ttk::labelframe .sampling -text "Sampling" ]\
> [::ttk::labelframe .dispersion -text "Dispersion"]\
> -sticky news
> grid\
> [::ttk::labelframe .dose -text "Optimize nuclide set for" ]\
> [::ttk::button .runpuff -text "Run LaPuffetta" -command
> donuclidereduction]\
> -sticky news
> grid .logo_label -column 2 -row 3 -columnspan 3 -sticky se
>
> --> Is there a simple way to disable e.g. everything (all the labels,
> the checkbuttons, the entries and the comboboxes) associated with
> ".release" in 1 go?
>
> Regards,
>
> Arjan

What I do is use the notion of "actions" (http://wiki.tcl.tk/11505).
The action library I use lets me group things together with tags, so I
can do something like "action disable edit" an all widgets associated
with the "edit" tag become disabled.

It requires very small amount of work to set up but the benefits are
worth it.