📄 messageinfo.itk
字号:
# ----------------------------------------------------------------------# 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -