Re: [tkinter] widget size adjustment

2016-06-22 Thread Christian Gollwitzer
Am 22.06.16 um 23:18 schrieb Zachary Ware: On Wed, Jun 22, 2016 at 4:05 PM, Christian Gollwitzer wrote: BTW, the Tkinter wrapper is a bit clumsy for this option. In the original Tk, the sticky option is just a string. You can still pass that and do sticky='nsew' instead of the clumsy

Re: [tkinter] widget size adjustment

2016-06-22 Thread Zachary Ware
On Wed, Jun 22, 2016 at 4:05 PM, Christian Gollwitzer wrote: > BTW, the Tkinter wrapper is a bit clumsy for this option. In the original > Tk, the sticky option is just a string. You can still pass that and do > > sticky='nsew' > > instead of the clumsy > > sticky=Tkinter.N+Tkinter

Re: [tkinter] widget size adjustment

2016-06-22 Thread Christian Gollwitzer
Am 22.06.16 um 22:53 schrieb Pierre-Alain Dorange: Christian Gollwitzer wrote: If you do not see the background, then indeed the canvas is not resized, which means the gridding options are wrong. Looking at your code, I see this: self.map.grid(row=1,column=1,rowspan=4,columnspan=2,padx=2,pady=

Re: [tkinter] widget size adjustment

2016-06-22 Thread Pierre-Alain Dorange
Christian Gollwitzer wrote: > > If you do not see the background, then indeed the canvas is not resized, > which means the gridding options are wrong. Looking at your code, I see > this: > > self.map.grid(row=1,column=1,rowspan=4,columnspan=2,padx=2,pady=2) > > Here, you do not specify any sti

Re: [tkinter] widget size adjustment

2016-06-22 Thread Christian Gollwitzer
Am 22.06.16 um 19:42 schrieb Pierre-Alain Dorange: Christian Gollwitzer wrote: Perhaps your assumption is wrong. Maybe the canvas itself *is* resized, so the white space you see around the image is the background of the canvas. To test this easily, set a strong color for the background:

Re: [tkinter] widget size adjustment

2016-06-22 Thread Pierre-Alain Dorange
Christian Gollwitzer wrote: > Perhaps your assumption is wrong. Maybe the canvas itself *is* resized, > so the white space you see around the image is the background of the > canvas. To test this easily, set a strong color for the background: > > blabla = tk.Canvas(..., bg='red') > > You

Re: [tkinter] widget size adjustment

2016-06-21 Thread Pierre-Alain Dorange
Rick Johnson wrote: > However, what do you expect your images to do when the > window is morphed: Stretch or Resize? Resize. The map image is a (small) portion of a virtual infitine map of the world (build throught downloading tiles images from tile map servers) : user can drag the map to see a

Re: [tkinter] widget size adjustment

2016-06-21 Thread Rick Johnson
On Tuesday, June 21, 2016 at 12:24:56 PM UTC-5, Pierre-Alain Dorange wrote: > > > (3) Or perhaps you want the canvas content(s) to resize > > dynamically as the canvas expands and contacts? > > That is more close to my needs. > > A picture is often better than words, here is a scren > capture of my

Re: [tkinter] widget size adjustment

2016-06-21 Thread Christian Gollwitzer
Am 21.06.16 um 19:24 schrieb Pierre-Alain Dorange: A picture is often better than words, here is a scren capture of my apps before and after resing the main window : It was a map viewer similar to online javascript mapviewer but in a loca

Re: [tkinter] widget size adjustment

2016-06-21 Thread Pierre-Alain Dorange
Rick Johnson wrote: > I'm sorry, but your explanation is lacking, and could be > the reason you have not received help so far. Yes you're probably right. For my excuse i'm french and if i read english, i'm not fluent with it for writing... > I'll attempt > to guess what the problem is, and then

Re: [tkinter] widget size adjustment

2016-06-21 Thread Rick Johnson
On Sunday, June 19, 2016 at 1:29:11 PM UTC-5, Pierre-Alain Dorange wrote: > I got a small interface handle with tkinter / Gridmanager. > I configure row and column to follow user window size > adjustement, that' fine. but i do not know how to adjust > the main widget : a canvas displaying a portion

[tkinter] widget size adjustment

2016-06-19 Thread Pierre-Alain Dorange
Hi, I got a small interface handle with tkinter / Gridmanager. I configure row and column to follow user window size adjustement, that' fine. but i do not know how to adjust the main widget : a canvas displaying a portion of a big image. I bind a resize event that works, but do not know what to do