issue with Tkinter canvas widget

Reply

Join Date: Jun 2008
Posts: 27
Reputation: TheOneElectroni is an unknown quantity at this point 
Solved Threads: 2
TheOneElectroni's Avatar
TheOneElectroni TheOneElectroni is offline Offline
Light Poster

issue with Tkinter canvas widget

 
0
  #1
Jul 30th, 2008
Hello everybody,

I've a somewhat odd issue displaying a .png image onto a Tkinter canvas.
The image is surrounded by a grey frame.
Here below an excerpt of the relevant code and by the way I'm running under windows xp.
The same thing happens with the menu of the gui, it stays grey whatever colour I set.
Any suggestion about this issue?

  1. self.frameCanvas = Frame(master, bg="white", bd=0, relief=FLAT)
  2. self.frameCanvas.grid(column=1, row=0, rowspan=2, sticky=NE, padx=10, pady=5)
  3. #
  4. self.logo = Canvas(self.frameCanvas, width=70, height=70, bg="white", bd=0)
  5. self.logo.create_image(36, 36, image=self.Logo_TCTK)
  6. self.logo.grid()
  7. self.logo.image = self.Logo_TCTK

Thank you all
Attached Thumbnails
canvas.JPG  
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 1,588
Reputation: Ene Uran has a spectacular aura about Ene Uran has a spectacular aura about 
Solved Threads: 186
Ene Uran's Avatar
Ene Uran Ene Uran is offline Offline
Posting Virtuoso

Re: issue with Tkinter canvas widget

 
0
  #2
Aug 3rd, 2008
You might have to give us some more of your code. Don't be bashful!
drink her pretty in burbank
Reply With Quote Quick reply to this message  
Join Date: Jun 2008
Posts: 27
Reputation: TheOneElectroni is an unknown quantity at this point 
Solved Threads: 2
TheOneElectroni's Avatar
TheOneElectroni TheOneElectroni is offline Offline
Light Poster

Re: issue with Tkinter canvas widget

 
0
  #3
Aug 4th, 2008
I can indeed give you the full code of the app infrastructure which is the one creating the gui's aspect and common widgets. This part then call the various modules which I don't include here as I don't think they're useful to solve the problem.
Be warned that the code is rude and not at all smooth and clean

Thanks to all again.

Gab
Attached Files
File Type: txt P_list.txt (13.2 KB, 2 views)
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 1,047
Reputation: Gribouillis is a jewel in the rough Gribouillis is a jewel in the rough Gribouillis is a jewel in the rough 
Solved Threads: 253
Gribouillis's Avatar
Gribouillis Gribouillis is online now Online
Veteran Poster

Re: issue with Tkinter canvas widget

 
2
  #4
Aug 4th, 2008
Reply With Quote Quick reply to this message  
Join Date: Jun 2008
Posts: 27
Reputation: TheOneElectroni is an unknown quantity at this point 
Solved Threads: 2
TheOneElectroni's Avatar
TheOneElectroni TheOneElectroni is offline Offline
Light Poster

Re: issue with Tkinter canvas widget

 
0
  #5
Aug 4th, 2008
that's it!
Thank you so much!

By the way, any advice to change the default menu grey colour? Just setting the bg option doesn't work. Somewhere I read it's a Tkinter bug.
Any idea?

Gab
Last edited by TheOneElectroni; Aug 4th, 2008 at 8:01 am. Reason: missing a question
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 1,047
Reputation: Gribouillis is a jewel in the rough Gribouillis is a jewel in the rough Gribouillis is a jewel in the rough 
Solved Threads: 253
Gribouillis's Avatar
Gribouillis Gribouillis is online now Online
Veteran Poster

Re: issue with Tkinter canvas widget

 
0
  #6
Aug 4th, 2008
google is your friend !
I post the solution here, for future reference:

set highlightthickness to 0 (zero)
Reply With Quote Quick reply to this message  
Join Date: Jun 2008
Posts: 27
Reputation: TheOneElectroni is an unknown quantity at this point 
Solved Threads: 2
TheOneElectroni's Avatar
TheOneElectroni TheOneElectroni is offline Offline
Light Poster

Re: issue with Tkinter canvas widget

 
0
  #7
Aug 4th, 2008
That works fine indeed on the canvas widget.
For the menu it's not a valid option however.
I tried and googled some time ago and found only one reference stating that the bg setting in the menu widget it's broken.
That's why I was wondering if someone of you already faced such a problem.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the Python Forum


Views: 816 | Replies: 6
Thread Tools Search this Thread



Tag cloud for Python
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2010 DaniWeb® LLC