Ruby/Tk/Entry TextField
Материал из Wiki.crossplatform.ru
(Различия между версиями)
ViGOur (Обсуждение | вклад) м (1 версия) |
Текущая версия на 17:57, 13 сентября 2010
Display a label and an Entry widget:
require "tk" top = TkRoot.new {title "Label and Entry Widget"} lb1 = TkLabel.new(top){ text "Hello World" background "yellow" foreground "blue" pack() } e1 = TkEntry.new(top){ background "red" foreground "blue" pack() } Tk.mainloop
Text Field
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