To understand the use of row and column options : Layout « Tk « Ruby






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

1.Layout a label
2.Grid layout manager places its child widgets in a table-like arrangement
3.Place geometry manager
4.Pack option