Re: [Tutor] Tkinter layout question

2017-04-30 Thread Alan Gauld via Tutor
On 26/04/17 07:56, Phil wrote: >> Your messages come into the moderation queue, I'm > > Thanks Alan, maybe the reason ...is because I'm > on the bounces list. I don;t know what bounces list you mean but it looks like your messages are going through directly now, I don't know what changed...

Re: [Tutor] Tkinter layout question

2017-04-26 Thread Phil
On Tue, 25 Apr 2017 23:27:05 +0100 Alan Gauld via Tutor wrote: > Your messages come into the moderation queue, I'm > not sure why because the moderation flag is not > set on your account(it is automatically for new > members). > > I'll have a closer look next eek when I get

Re: [Tutor] Tkinter layout question

2017-04-25 Thread Alan Gauld via Tutor
On 24/04/17 23:40, Phil wrote: By the way, I notice that my messages to this list, > and not other's, can take up to four hours Your messages come into the moderation queue, I'm not sure why because the moderation flag is not set on your account(it is automatically for new members). I'll

Re: [Tutor] Tkinter layout question

2017-04-24 Thread Phil
On Mon, 24 Apr 2017 20:02:32 +0100 Alan Gauld via Tutor wrote: > On 24/04/17 01:50, Phil wrote: > > On Mon, 24 Apr 2017 09:24:55 +1000 > > Phil wrote: > > > >> On Sun, 23 Apr 2017 09:39:54 +0200 > >> Sibylle Koczian wrote: > >> >

Re: [Tutor] Tkinter layout question

2017-04-24 Thread Alan Gauld via Tutor
On 24/04/17 20:02, Alan Gauld via Tutor wrote: And you could wrap that up as a pair of get/set functions if you so wished. def get_sudoku_grid(x,y): # code above return item def set_sudoku_grid(x,y,value): #code above item = value I should point out that to use my table code

Re: [Tutor] Tkinter layout question

2017-04-24 Thread Alan Gauld via Tutor
On 24/04/17 01:50, Phil wrote: On Mon, 24 Apr 2017 09:24:55 +1000 Phil wrote: On Sun, 23 Apr 2017 09:39:54 +0200 Sibylle Koczian wrote: Am 20.04.2017 um 14:43 schrieb Alan Gauld via Tutor: Its not too bad you can map the large 9x9 table to the

Re: [Tutor] Tkinter layout question

2017-04-24 Thread Phil
On Sun, 23 Apr 2017 11:28:51 +0200 Peter Otten <__pete...@web.de> wrote: > Consider the function make_a_cake(). If you use it > > eat_a_piece_of(make_a_cake()) > eat_a_piece_of(make_a_cake()) > > that's short for > > one_cake = make_a_cake() > eat_a_piece_of(one_cake) > > another_cake =

Re: [Tutor] Tkinter layout question

2017-04-23 Thread Phil
On Mon, 24 Apr 2017 09:24:55 +1000 Phil wrote: > On Sun, 23 Apr 2017 09:39:54 +0200 > Sibylle Koczian wrote: > > > Am 20.04.2017 um 14:43 schrieb Alan Gauld via Tutor: > > > Its not too bad you can map the large 9x9 table to the smaller > > > units

Re: [Tutor] Tkinter layout question

2017-04-23 Thread Phil
On Sun, 23 Apr 2017 09:39:54 +0200 Sibylle Koczian wrote: > Am 20.04.2017 um 14:43 schrieb Alan Gauld via Tutor: > > Its not too bad you can map the large 9x9 table to the smaller units > > using divmod() > > > > So the 7th element becomes > > divmod(7) -> 2,1 > > > >

Re: [Tutor] Tkinter layout question

2017-04-23 Thread Peter Otten
Phil wrote: > On Sun, 23 Apr 2017 09:52:16 +0200 > Peter Otten <__pete...@web.de> wrote: > >> If you wrote the above with Buttons instead of DisplayTables you'd >> encounter the same behaviour. The problem is that you call >> tkinter.Tk() twice (which is generally a recipe for disaster; if you

Re: [Tutor] Tkinter layout question

2017-04-23 Thread Phil
On Sun, 23 Apr 2017 09:52:16 +0200 Peter Otten <__pete...@web.de> wrote: > If you wrote the above with Buttons instead of DisplayTables you'd > encounter the same behaviour. The problem is that you call > tkinter.Tk() twice (which is generally a recipe for disaster; if you > want multiple windows

Re: [Tutor] Tkinter layout question

2017-04-23 Thread Peter Otten
Phil wrote: > On Thu, 20 Apr 2017 13:43:07 +0100 > Alan Gauld via Tutor wrote: > >> If still confused drop a question here. > > I hope I'm not over doing the questions here. I'm only posting after hours > of experimenting and Internet searching. > > How do I create multiple

Re: [Tutor] Tkinter layout question

2017-04-23 Thread Sibylle Koczian
Am 20.04.2017 um 14:43 schrieb Alan Gauld via Tutor: Its not too bad you can map the large 9x9 table to the smaller units using divmod() So the 7th element becomes divmod(7) -> 2,1 Should be divmod(7, 3), shouldn't it? ___ Tutor maillist -

Re: [Tutor] Tkinter layout question

2017-04-22 Thread Phil
On Thu, 20 Apr 2017 13:43:07 +0100 Alan Gauld via Tutor wrote: > If still confused drop a question here. I hope I'm not over doing the questions here. I'm only posting after hours of experimenting and Internet searching. How do I create multiple instances of the table on the

Re: [Tutor] Tkinter layout question

2017-04-22 Thread Phil
On Sat, 22 Apr 2017 10:37:19 +0200 Peter Otten <__pete...@web.de> wrote: > That's unnecessary. The code protected by 'if __name__ == "__main__"' > is not executed when the module is imported. In fact that's the very > purpose of this idiom. > > "Best practice" is to avoid star imports which

Re: [Tutor] Tkinter layout question

2017-04-22 Thread Peter Otten
Phil wrote: > On Thu, 20 Apr 2017 13:43:07 +0100 > Alan Gauld via Tutor wrote: > >> If still confused drop a question here. > > Maybe not totally confused, more a question of best practice. > > Using your example table class, I commented out all from, and including, > "if

Re: [Tutor] Tkinter layout question

2017-04-21 Thread Phil
On Thu, 20 Apr 2017 13:43:07 +0100 Alan Gauld via Tutor wrote: > If still confused drop a question here. Maybe not totally confused, more a question of best practice. Using your example table class, I commented out all from, and including, "if __name__ == "__main__":" down

Re: [Tutor] Tkinter layout question

2017-04-20 Thread Alan Gauld via Tutor
On 20/04/17 13:43, Alan Gauld via Tutor wrote: > So the 7th element becomes > divmod(7) -> 2,1 > > ie. element 7 maps to the 2nd cell, element 1 That should of course be the 3rd cell (0 based), oops. -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/

Re: [Tutor] Tkinter layout question

2017-04-20 Thread Alan Gauld via Tutor
On 20/04/17 10:33, Phil wrote: >> So, for a Suduko grid put 3x3 Entry boxes into a Frame. >> Then put 3x3 such frames into another frame. > > OK, so I'll go back to my original idea and use edit boxes. A grid of 9 x 9 > edit boxes does actually work and it makes it easy to keep track of the >

Re: [Tutor] Tkinter layout question

2017-04-20 Thread Phil
On Thu, 20 Apr 2017 09:27:27 +0100 Alan Gauld via Tutor wrote: > Eek! that's a recipe for premature baldness! Baldness is not a problem, however, slowing the onset of dementia is the aim of this project. > So, for a Suduko grid put 3x3 Entry boxes into a Frame. > Then put

Re: [Tutor] Tkinter layout question

2017-04-20 Thread Alan Gauld via Tutor
On 19/04/17 23:48, Phil wrote: > I created a 9 x 9 grid on a canvas which looks much better. > I can display digits in the centre of the squares but > entering the digits from the keyboard seems to be beyond me. Eek! that's a recipe for premature baldness! Canvas is designed to display things

Re: [Tutor] Tkinter layout question

2017-04-20 Thread Palm Tree
for entering digits on the canva i think better create a sort of sudoku generator and display it on the canva in a create_text object. On 20 Apr 2017 05:24, "Phil" wrote: > I'm looking for ideas here. > > A working solution for my sudoku solver is a 9 x 9 grid of entry

Re: [Tutor] Tkinter layout question - solved

2017-04-20 Thread Phil
On Wed, 19 Apr 2017 22:21:28 -0500 Just to save people answering this question unnecessarily I have solved the immediate problem. I can now enter a digit at the mouse coordinates. Some refinement is still necessary. -- Regards, Phil ___ Tutor

Re: [Tutor] Tkinter layout question

2017-04-20 Thread Phil
On Wed, 19 Apr 2017 22:21:28 -0500 boB Stepp wrote: Thank you Bob and Palm for your replies. They have given me something more tto think about. ideas > I don't know (now) how to solve your challenges below. But if I were > trying to figure this out, I would try to find

Re: [Tutor] Tkinter layout question

2017-04-19 Thread boB Stepp
I don't know (now) how to solve your challenges below. But if I were trying to figure this out, I would try to find more complex tkinter example applications that contain some of the issues I'd be interested in. Then I would dig into the code, find the relevant pieces, and then start playing