git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

tkinter: tk.grid columnspan


In one row of a grid layout I have these two input widgets:

 	self.inputs['name'] = LabelInput(
             self, 'Site Name',
             input_var=tk.StringVar(),
             )
         self.inputs['name'].grid(sticky=tk.W, row=0, column=0)

         self.inputs['description'] = LabelInput(
             self, 'Site Description',
             input_var=tk.StringVar(),
         )
         self.inputs['description'].grid(row=0, column=1, columnspan=2)

I want the second one (description) to be wider and thought the columnspan
option would do the job. It does not. I've read several web pages on the
tk.grid without seeing the proper way of making a stringvar wider than a
single grid cell.

Please teach me how to make a tk.StingVar cover two columns in a grid
layout.

TIA,

Rich