zoukankan      html  css  js  c++  java
  • Toplevel mix with Widget

    class child {
          inherit itk::Widget  
          public variable child_a
          constructor { args }  {
           itk_option add hull.width hull.height
           $itk_component(hull) configure -width 1050 -height 768 
           wm minsize [winfo toplevel $itk_component(hull)] 1050 768
           pack propagate $itk_interior 0
          
           itk_component add menu {
      menu $itk_interior.menu \
          -tearoff 0 \
          -borderwidth 1
      }
          
           [winfo toplevel $itk_component(hull)] configure \
          -menu $itk_component(menu)
          
           itk_component add sessionmenu {
       menu $itk_interior.menu.session \
           -tearoff 0
      }
          
            $itk_component(menu) add cascade \
          -label "Session" \
          -menu $itk_component(sessionmenu)
          
           itk_component add toolbar_frame {
             frame $itk_interior.tbf \
          -bd 1 \
          -relief solid
      }      
     
           itk_component add label {
         label $itk_interior.tbf.label \
             -text "Images" \
             -font 12 \
             -anchor w
            } {
         usual
         ignore -font
      }
          
           grid $itk_component(toolbar_frame) -row 0 -column 1 -sticky nswe
           pack $itk_component(label) -side left -padx 5 -pady 5 -fill both -expand 1
           eval itk_initialize $args
          }
    }


    child .aa
    pack .aa

  • 相关阅读:
    [LeetCode]Reverse Linked List II
    [LeetCode]Remove Duplicates from Sorted List II
    嵌入式培训学习历程第六天
    嵌入式培训学习历程第五天
    嵌入式培训学习历程第三天
    嵌入式培训学习历程第二天
    嵌入式培训学习历程第一天
    shell编程
    找整除--全国模拟(二)
    最长公共连续子串--全国模拟(二)
  • 原文地址:https://www.cnblogs.com/greencolor/p/2128635.html
Copyright © 2011-2022 走看看