Hi everybody,
I have a problem with the grid function in tk.
I juste try to put 4 buttons like this:
-------------------
| | |
| | C |
| A |--------|
| | |
---------- D |
| | |
| B | |
-------------------
A is 2x2
C is 1x2
B is 1x2
D is 2x2
but the code bellow dont work :
require(tcltk)
tt <- tktoplevel(borderwidth=10)
A.but <- tkbutton(tt,text="A",command=function()ls())
B.but <- tkbutton(tt,text="B",command=function()ls())
C.but <- tkbutton(tt,text="C",command=function()ls())
D.but <- tkbutton(tt,text="D",command=function()ls())
tkgrid(A.but,row=1,column=1,columnspan=2,rowspan=2,sticky="nswe")
tkgrid(B.but,row=3,column=1,columnspan=2,rowspan=1,sticky="nswe")
tkgrid(C.but,row=1,column=3,columnspan=2,rowspan=1,sticky="wens")
tkgrid(D.but,row=3,column=3,columnspan=2,rowspan=2,sticky="wens")
any idea?