Skip to content
Prev 300251 / 398502 Next

Tk grid problem

vincent guyader <vincent.guyader <at> gmail.com> writes:
The row for D.but should be 2, not 3 though I would index at 0 not 1:



tkgrid(A.but,row=1-1,column=1-1,columnspan=2,rowspan=2,sticky="nswe")
tkgrid(B.but,row=3-1,column=1-1,columnspan=2,rowspan=1,sticky="nswe")
tkgrid(C.but,row=1-1,column=3-1,columnspan=2,rowspan=1,sticky="wens")
tkgrid(D.but,row=3-1-1,column=3-1,columnspan=2,rowspan=2,sticky="wens")


Then to get the buttons to expand into the allocated sace, you can configure 
the row and column weights:

sapply(0:3, function(i) {
  if(i < 3) tkgrid.rowconfigure(tt, i, weight = 1)
  tkgrid.columnconfigure(tt, i, weight = 1)
})