ttk button span multiple columns ttk button span multiple columns tkinter tkinter

ttk button span multiple columns


Example expand last two columns. Row 10 and columns 1 and 2

python 2

import Tkinker as tk

python 3

import tkinter as tk
btnOff = ttk.Button(self, text = "OFF", command = tc.Off).                grid(column = 1, row = 10, columnspan = 2, sticky = tk.W+tk.E)


when you want to use columnspan you will need to make sure sticky W and E selected, similar for rowspan you will need N and S