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

  • 相关阅读:
    Python自学笔记(12day)
    Python自学笔记(11day)
    Python自学笔记(10day)
    Python自学笔记(9day)
    Python自学笔记(8day)
    form标签的使用
    form标签的使用法
    img标签的使用方法
    <a></a>标签的使用
    html的标签
  • 原文地址:https://www.cnblogs.com/greencolor/p/2135753.html
Copyright © 2011-2022 走看看