[Tkinter-discuss] Tkinter grid_info()

Paul Malherbe paul at tartan.co.za
Wed Feb 18 06:51:58 CET 2015


Hi

Definitely the same problem and the solution helped.

Thanks, Paul
Signature


On 17/02/2015 22:51, inq1ltd wrote:
> Paul,
>
> Try this link, sounds like the same problem 
> that you have.
>
> https://mail.python.org/pipermail/tkinter-discuss/2013-December/003538.html
>
>
> jimonlinux
> inq1ltd at inqvista.com
>
>
>
>
> On Tuesday, February 17, 2015 07:28:37 PM 
> Paul Malherbe wrote:
>> No
>>
>> I want to store the info detail so that if
>> I later forget the widget I can restore it
>> to the same position using the stored
>> details.
>>
>> Paul
>>
>> On 17/02/2015 18:55, inq1ltd wrote:
>>> Paul,
>>> Are you trying to create a loop to add
>>> entry fields to a form?
>>>
>>> jimonlinux
>>> inq1ltd at inqvista.com
>>>
>>>
>>>
>>> On Tuesday, February 17, 2015 05:41:36 PM
>>>
>>> Paul Malherbe wrote:
>>>> Please could someone tell me why this is
>>>> not working?
>>>>
>>>> from Tkinter import *
>>>>
>>>> root = Tk()
>>>> e = Entry(root)
>>>> e.grid(column=0, row=0)
>>>> info = e.grid_info()
>>>> print "row:", info["row"], "column:",
>>>> info["column"] root.mainloop()
>>>>
>>>> Running this displays the following
>>>> error:
>>>>
>>>> Traceback (most recent call last):
>>>>   File "test.py", line 6, in <module>
>>>>   
>>>>     grid_info = e.grid_info()
>>>>   
>>>>   File
>>>>
>>>> "/usr/lib/python2.7/lib-tk/Tkinter.py",
>>>> line 2000, in grid_info
>>>> self.tk.call('grid', 'info', self._w))
>>>> TypeError: coercing to Unicode: need
>>>> string or buffer, _tkinter.Tcl_Obj found
>>>> ________________________________________
>>>> ___ ____ Tkinter-discuss mailing list
>>>> Tkinter-discuss at python.org
>>>> https://mail.python.org/mailman/listinfo
>>>> /tk inter-discuss



More information about the Tkinter-discuss mailing list