Ruby 使用 TkEntry
- 作者: 善良的高富帅
- 来源: 51数据库
- 2022-08-12
require 'tk'
top = TkRoot.new {title "Label and Entry Widget"}
lb1=TkLabel.new(top){
text 'Hello World'
background "yellow"
foreground "blue"
pack('padx'=>10, 'pady'=>10, 'side'=>'left')
}
e1 = TkEntry.new(top){
background "red"
foreground "blue"
pack('padx'=>10, 'pady'=>10, 'side'=>'left')
}
Tk.mainloop
推荐阅读
