zoukankan      html  css  js  c++  java
  • usual

    class cc {
     inherit itk::Widget
     public method changtext 
     #array aar
     itk_option define -textbackground textBackground Background "\#ff0000"
     
     constructor {args} {
     itk_component add linetwo {
        button $itk_component(hull).d \
                -text "bbb"
     }
      
     itk_component add buttontwo {
        button $itk_component(hull).b \
                -text "est" \
                -command "$itk_component(hull) changtext ccc"
     } {
      usual
         keep -text
     }
      
     pack $itk_component(linetwo)
     pack $itk_component(buttontwo)
     }
    }

    body cc::changtext { args } {
     #set aar[1] 0;
     #puts $aar[1]
     .c.d configure -text $args
     .c.b configure -text $args
    }


    cc .c
    pack .c

    can not change buttontwo

    ====================================

    class cc {
     inherit itk::Widget
     public method changtext 
     #array aar
     itk_option define -textbackground textBackground Background "\#ff0000"
     
     constructor {args} {
     itk_component add linetwo {
        button $itk_component(hull).d \
                -text "bbb"
     }
      
     itk_component add buttontwo {
        button $itk_component(hull).b \
                -text "est" \
                -command "$itk_component(hull) changtext ccc"
     } {
      usual 
         ignore -text
     }
      
     pack $itk_component(linetwo)
     pack $itk_component(buttontwo)
     }
    }

    body cc::changtext { args } {
     #set aar[1] 0;
     #puts $aar[1]
     .c.d configure -text $args
     .c.b configure -text $args
    }


    cc .c
    pack .c


    buttontwo can be changed

  • 相关阅读:
    pyQt5新手教程 (二)开始你的旅程-编写
    未来写作
    电脑使用问题
    cad学习问题
    chm制作
    github学习之路
    python解决实际问题
    英语学习
    经济学
    通过playgrounds程序学习swift语言及思想
  • 原文地址:https://www.cnblogs.com/greencolor/p/2133698.html
Copyright © 2011-2022 走看看