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

  • 相关阅读:
    第二章 怎样培养好习惯
    十六、使用jQuery操作元素 —— DOM属性与HTML元素属性
    第六章 培养感恩的习惯
    js 问题集锦 之 二
    HTML 5 学习笔记之 常用标签简介
    MySql 笔记一 之 时间和日期函数
    HTML 5 学习笔记之 canvas 标签
    MySql 笔记三 循环语句
    转载文:架构经验系列文章
    MySql 笔记二 基础命令
  • 原文地址:https://www.cnblogs.com/greencolor/p/2133698.html
Copyright © 2011-2022 走看看