[Tkinter-discuss] thicker lines

Stewart Midwinter stewart.midwinter at gmail.com
Wed Apr 5 08:11:43 CEST 2006


I see that you are drawing a 9x9 grid of buttons to make your sudoku
game. BUT, sudoku is in fact composed of a grid of 3x3 boxes, each of
which contains a 3x3 grid of buttons. Isn't that right?

my suggestion would be to use the grid method to place 3x3 frames,
each of which can have a solid, thick border. Then inside those frames
you can place your buttons.

cheers
s

On 4/4/06, Pavel Kosina <geon at post.cz> wrote:
> I would like to ask for bright and simple idea how to draw thicker lines
> between each 3 fields in this grid. Its about sudoku so the slines
> should be there 4: 2 horizontaly a 2 vertikaly and maybe one around.
> Some idea is already present with me but its quite complicated.
>
>
> from Tkinter import *
>
> root=Tk()
> size=2
>
> for i in range(81):
>     _row, _column=divmod(i,9)
>     butt=Button(root, text=str(i), height=size, width=size*2, relief=RAISED)
>     butt.grid(row=_row, column=_column)
>
>
> root.title("sudoku")
> root.mainloop()
>
> Thank you
>
> --
> Pavel Kosina
>
> _______________________________________________
> Tkinter-discuss mailing list
> Tkinter-discuss at python.org
> http://mail.python.org/mailman/listinfo/tkinter-discuss
>


--
Stewart Midwinter
stewart at midwinter.ca
stewart.midwinter at gmail.com
Skype, GoogleTalk, iChatAV, MSN, Yahoo: midtoad
AIM:midtoad1


More information about the Tkinter-discuss mailing list