zoukankan      html  css  js  c++  java
  • 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

  • 相关阅读:
    网站的安全架构
    Charles Proxy for Mac & Windows (4.1.3)破解激活工具
    charles抓包工具的中文乱码解决方法
    Charles 从入门到精通
    go语言知识点
    Golang Import使用入门
    算法图解之选择排序
    算法图解之数组和链表
    算法图解之大O表示法
    算法图解之内存的工作原理
  • 原文地址:https://www.cnblogs.com/greencolor/p/2135753.html
Copyright © 2011-2022 走看看