the code which i given below i just want to know the exact location of row and column and also want to know how many rows and column are there so i can place my widget at specific location that i want after knowing this =
I’ve not coded many Tkinter apps, but this is my understanding, which may or may not be flawed…
There is no ‘exact location’, as you put it: the location of one widget, on a ‘x’ ‘y’ grid, will depend on the location of another widget being on the same grid.
If you .grid(row=0, column=0) a widget, and it’s the only widget, it will be centered in the containing widget (say, your window, for example).
Now for your second widget, if you .grid(row=0, column=1) it will be to the right of the first one, which will shift left, so that both are relative center in the containing widget.
You may want to plan ahead when numbering the rows and columns. For example, the second widget may be .grid(row=0, column=10) which will look exactly the same as before, but now you have the option (should you need to) to use any of the columns between 1 and 9 for a widget (or widgets) that you may want in the future, without having to change the column numbers of the already coded widgets: coding a third widget with .grid(row=0, column=5) for example, will ‘grid’ the third one between the first two.