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

  • 相关阅读:
    垂直渐变的Button
    winform下重画ListBox
    分享一个 C# Winfrom 下的 OutlookBar 控件的使用
    颜色下拉菜单(combox)
    Robot Framework 使用技巧 快捷键
    Batch 拷贝远程机器文件到本机指定目录下
    JMeter常用函数 使用图解
    SoapUI报ClientProtocolException错误
    Setup Script in SoapUI
    邮件自动回复
  • 原文地址:https://www.cnblogs.com/greencolor/p/2135753.html
Copyright © 2011-2022 走看看