login.tk

来自「Linux程序源码」· TK 代码 · 共 23 行

TK
23
字号
#!/usr/bin/wish -f# First, set up the look of the login window. We also define a global loginName variable.set loginName "timB"label .name -text "Login:"entry .nameEntry -textvariable loginName label .passwd -text "Password:"entry .passwdEntry -textvariable passwd -show *# Then we select all the text from .nameEntry..nameEntry selection from 0.nameEntry selection to end# Lastly, we arrange the widgets on the screen-we'll explain it later!grid .name  -row 0 -column 0 -sticky "w" grid .passwd -row 1 -column 0 -sticky "w"grid .nameEntry -row 0 -column 1 -columnspan 2 -sticky "W"grid .passwdEntry -row 1  -column 1 -columnspan 2 -sticky "W"

⌨️ 快捷键说明

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