Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 593633
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T15:52:00+00:00 2026-05-13T15:52:00+00:00

Is there way to disable all widget in tk window with single proc? argument

  • 0

Is there way to disable all widget in tk window with single proc? argument can be just initial toplevel path.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T15:52:01+00:00Added an answer on May 13, 2026 at 3:52 pm

    Given a widget, you can get all of the children of that widget with [winfo children]. With a tiny recursive procedure you can act upon every widget in a tree of widgets. If you want to be lazy, you can usually also get a list of all widgets by doing [info commands .*]. That is often Good Enough, unless your application creates procedures or images with a name that begin with “.”.

    Most tk widgets accept a “-state” option, and those that don’t can usually be ignored since state doesn’t matter (for example, a frame widget). So, you can iterate over all the widgets and do something like [catch {$widget configure -state disabled}]. This won’t work if you have unusual widgets that need to be enabled or disabled by some other means (such as the ttk button which has a “state” subcommand).

    If you have a simple application using standard widgets, something like this may be Good Enough:

    proc disable_all {path} {
        catch {$path configure -state disabled}
        foreach child [winfo children $path] {
            disable_all $child
        }
    }
    

    For precise control you can use “[winfo class $widget]” to get the class of the widget, and do different commands depending on the class.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.