messageinfo.itk

来自「linux 下的源代码分析阅读器 red hat公司新版」· ITK 代码 · 共 41 行

ITK
41
字号
# ----------------------------------------------------------------------#  EXAMPLE: using inheritance to specialize mega-widgets# ----------------------------------------------------------------------#  COURSE:  Object-Oriented Programming with [incr Tcl]#  AUTHOR:  Michael J. McLennan, Bell Labs Innovations# ======================================================================#               Copyright (c) 1996  Lucent Technologies# ======================================================================option add *MessageInfo.title "Notice" widgetDefaultclass MessageInfo {    inherit Info    constructor {args} {        itk_component add message {            label $itk_interior.mesg -width 20        } {            usual            rename -text -message message Text        }        pack $itk_component(message) -expand yes -fill both        bind $itk_component(message) <Configure> [code $this resize]        eval itk_initialize $args    }    private method resize {} {        set w [winfo width $itk_component(message)]        if {$w > 1} {            $itk_component(message) configure -wraplength $w        }    }}usual MessageInfo {    keep -background -cursor -foreground -font    keep -activebackground -activeforeground -disabledforeground    keep -highlightcolor -highlightthickness}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?