• Widget toplevel menu


    class menutest {
        inherit itk::Toplevel 
        constructor { args } {
     itk_option add hull.menu   
            wm title . "\[No image\"
            wm resizable . 1 1
     wm iconbitmap $itk_component(hull) [wm iconbitmap .]
     wm iconmask $itk_component(hull) [wm iconmask .]
     wm group $itk_component(hull) .
    # wm protocol $itk_component(hull) \
                   WM_DELETE_WINDOW [code $this hide]
            wm minsize . 600 200

     ### Menu bar and menus ####################################
     ###########################################################

     itk_component add menu {
         menu $itk_interior.menu \
      -tearoff 0 \
      -borderwidth 1
     }


     $itk_component(hull) configure \
      -menu $itk_component(menu)
     # Image menu ###############################################
     
     
     itk_component add imagemenu {
         menu $itk_interior.menu.image \
      -tearoff false \
      -relief raised \
      -borderwidth 1 \
      -activeborderwidth 0
     }

     $itk_component(menu) add cascade \
        -label "Image" \
      -menu $itk_component(imagemenu)  
          }
    }
    usual menutest {
     
    }
    #menutest .image

    class menutwo {
     inherit itk::Widget
     constructor { args } { 
      wm withdraw .  
      itk_component add menutestt {
       menutest $itk_component(hull).t
      }
      
     }
    }
    menutwo .c
    pack .c

  • 相关阅读:
    tp5 thinkphp5 伪静态修改 fastadmin
    ThinnkPHP内置视图循环语句
    PHP禁止重写策略
    冒泡排序
    Ruby--正则
    JS正则
    JS禁止父元素事件
    Rails--default_scope
    公网映射
    查企业情况和招聘的网站
  • 原文地址:https://www.cnblogs.com/greencolor/p/2135753.html
Copyright © 2020-2023  润新知