{"id":1392,"date":"2022-02-07T18:39:53","date_gmt":"2022-02-08T02:39:53","guid":{"rendered":"https:\/\/gantovnik.com\/bio-tips\/?p=1392"},"modified":"2022-02-07T18:39:53","modified_gmt":"2022-02-08T02:39:53","slug":"210-parametric-curve-in-3d-2-2-2-2-2-2-2-2-2-2-2-2-2-3-2-2-2-2-2","status":"publish","type":"post","link":"https:\/\/gantovnik.com\/bio-tips\/2022\/02\/210-parametric-curve-in-3d-2-2-2-2-2-2-2-2-2-2-2-2-2-3-2-2-2-2-2\/","title":{"rendered":"#264 Changing the color of button after some time in tcl\/tk"},"content":{"rendered":"<pre class=\"brush: python; title: ; notranslate\" title=\"\">\r\nset field1 &#x5B;radiobutton .field1 -disabledforeground green -state disabled]\r\nset field2 &#x5B;radiobutton .field2 -disabledforeground green -state disabled]\r\nset field3 &#x5B;radiobutton .field3 -disabledforeground green -state disabled]\r\nset field4 &#x5B;radiobutton .field4 -disabledforeground green -state disabled]\r\n\r\ngrid $field1 $field2 $field3 $field4\r\n\r\nbind .field1 &lt;Map&gt; &#x5B;list after 2000 {changeDisabledColor %W red}]\r\nbind .field2 &lt;Map&gt; &#x5B;list after 4000 {changeDisabledColor %W red}]\r\nbind .field3 &lt;Map&gt; &#x5B;list after 6000 {changeDisabledColor %W red}]\r\nbind .field4 &lt;Map&gt; &#x5B;list after 8000 {changeDisabledColor %W red}]\r\n\r\nproc changeDisabledColor {w color} {\r\n    $w configure -disabledforeground $color\r\n}\r\n<\/pre>\n<p><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/gantovnik.com\/bio-tips\/wp-content\/uploads\/2022\/02\/ex264.png?resize=122%2C57&#038;ssl=1\" alt=\"\" width=\"122\" height=\"57\" class=\"alignnone size-full wp-image-1393\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>set field1 &#x5B;radiobutton .field1 -disabledforeground green -state disabled] set field2 &#x5B;radiobutton .field2 -disabledforeground green -state disabled] set field3 &#x5B;radiobutton .field3 -disabledforeground green -state disabled] set field4 &#x5B;radiobutton .field4 -disabledforeground green -state disabled] grid $field1 $field2 $field3 $field4 bind .field1 &lt;Map&gt; &#x5B;list after 2000 {changeDisabledColor %W red}] bind .field2 &lt;Map&gt; &#x5B;list after 4000 {changeDisabledColor %W red}] [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"nf_dc_page":"","_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","_lmt_disableupdate":"yes","_lmt_disable":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[27],"tags":[],"class_list":["post-1392","post","type-post","status-publish","format-standard","hentry","category-tcl"],"modified_by":"gantovnik","jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8bH0k-ms","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":1047,"url":"https:\/\/gantovnik.com\/bio-tips\/2021\/11\/187-feet-to-meter-converter-using-python-tcl-tk\/","url_meta":{"origin":1392,"position":0},"title":"#187 Feet to meter converter using python tcl\/tk","author":"gantovnik","date":"2021-11-07","format":false,"excerpt":"[code language=\"python\"] package require Tk wm title . \"Feet to Meters\" grid [ttk::frame .c -padding \"3 3 12 12\"] -column 0 -row 0 -sticky nwes grid columnconfigure . 0 -weight 1; grid rowconfigure . 0 -weight 1 grid [ttk::entry .c.feet -width 7 -textvariable feet] -column 2 -row 1 -sticky we\u2026","rel":"","context":"In &quot;tcl&quot;","block_context":{"text":"tcl","link":"https:\/\/gantovnik.com\/bio-tips\/category\/tcl\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/gantovnik.com\/bio-tips\/wp-content\/uploads\/2021\/11\/ex187.png?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":1309,"url":"https:\/\/gantovnik.com\/bio-tips\/2022\/01\/133-create-vectors-and-planes-using-tcl-in-hypermesh-2-2-2-2-2-2-2-2-2-2\/","url_meta":{"origin":1392,"position":1},"title":"#236 Sorting a list in tcl","author":"gantovnik","date":"2022-01-04","format":false,"excerpt":"The syntax for sorting a list is [code language=\"python\"] lsort listname [\/code] Example: [code language=\"python\"] set var {orange blue red green} set var [lsort $var] puts $var [\/code] Result: [code language=\"python\"] blue green orange red [\/code]","rel":"","context":"In &quot;tcl&quot;","block_context":{"text":"tcl","link":"https:\/\/gantovnik.com\/bio-tips\/category\/tcl\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1305,"url":"https:\/\/gantovnik.com\/bio-tips\/2022\/01\/133-create-vectors-and-planes-using-tcl-in-hypermesh-2-2-2-2-2-2-2-2\/","url_meta":{"origin":1392,"position":2},"title":"#234 Set item in list at specific index in tcl","author":"gantovnik","date":"2022-01-04","format":false,"excerpt":"The syntax for setting list item at a specific index is [code language=\"python\"] lset listname index value [\/code] Example: [code language=\"python\"] set var {white blue red green} lset var 0 black puts $var [\/code] Result: [code language=\"python\"] black blue red green [\/code]","rel":"","context":"In &quot;tcl&quot;","block_context":{"text":"tcl","link":"https:\/\/gantovnik.com\/bio-tips\/category\/tcl\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1296,"url":"https:\/\/gantovnik.com\/bio-tips\/2022\/01\/133-create-vectors-and-planes-using-tcl-in-hypermesh-2-2-2-2\/","url_meta":{"origin":1392,"position":3},"title":"#230 Length of List in tcl","author":"gantovnik","date":"2022-01-03","format":false,"excerpt":"The syntax for length of list is [code language=\"python\"] llength listName [\/code] Example: [code language=\"python\"] set var {orange blue red green} puts [llength $var] [\/code]","rel":"","context":"In &quot;tcl&quot;","block_context":{"text":"tcl","link":"https:\/\/gantovnik.com\/bio-tips\/category\/tcl\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1300,"url":"https:\/\/gantovnik.com\/bio-tips\/2022\/01\/133-create-vectors-and-planes-using-tcl-in-hypermesh-2-2-2-2-2-2\/","url_meta":{"origin":1392,"position":4},"title":"#232 Insert item in list at index in tcl","author":"gantovnik","date":"2022-01-04","format":false,"excerpt":"The syntax for inserting list items at specific index is [code language=\"python\"] linsert listname index value1 value2..valuen [\/code] Example: [code language=\"python\"] set var {orange blue red green} set var [linsert $var 3 black white] puts $var [\/code]","rel":"","context":"In &quot;tcl&quot;","block_context":{"text":"tcl","link":"https:\/\/gantovnik.com\/bio-tips\/category\/tcl\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1294,"url":"https:\/\/gantovnik.com\/bio-tips\/2022\/01\/133-create-vectors-and-planes-using-tcl-in-hypermesh-2-2-2\/","url_meta":{"origin":1392,"position":5},"title":"#229 Appending Item to a List in tcl","author":"gantovnik","date":"2022-01-03","format":false,"excerpt":"The syntax for appending an item to a list is [code language=\"python\"] lappend listName value [\/code] Example: [code language=\"python\"] set var orange lappend var \"blue\" lappend var \"red\" lappend var \"green\" puts $var [\/code]","rel":"","context":"In &quot;tcl&quot;","block_context":{"text":"tcl","link":"https:\/\/gantovnik.com\/bio-tips\/category\/tcl\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/posts\/1392","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/comments?post=1392"}],"version-history":[{"count":0,"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/posts\/1392\/revisions"}],"wp:attachment":[{"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/media?parent=1392"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/categories?post=1392"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gantovnik.com\/bio-tips\/wp-json\/wp\/v2\/tags?post=1392"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}