To understand the use of row and column options
require 'tk'
top = TkRoot.new {title "Label and Entry Widget"}
lb1=TkLabel.new(top){
text 'Hello World'
background "yellow"
foreground "blue"
grid('row'=>0, 'column'=>0)
}
e1 = TkEntry.new(top){
background "red"
foreground "blue"
grid('row'=>0, 'column'=>1)
}
Tk.mainloop
Related examples in the same category