How to run an infinite loop on Menu?

2018-12-03 Thread huey . y . jiang
Hi Folks, I need to run an infinite loop on a Menu button, like this: from Tkinter import * def run_job(): i = 0 while 1: i = i + 1 if i > 100: break ... root = Tk() menu = Menu(root) root.config(menu=menu) filemenu = Menu(menu) menu.add_cascade(labe

How to find an object existing?

2018-06-13 Thread huey . y . jiang
Hi All, root = Tkinter.Tk() button = Tkinter.Button(root, text="Find me") button.pack() I created a button, Python object. I recall I can check this object existing by using winfo, such as winfo.exists(button). However, I forgot which super class contains this winfo method. I printed ou

Re: How to make a button flashing?

2018-06-13 Thread huey . y . jiang
On Wednesday, June 13, 2018 at 5:23:17 PM UTC+8, huey.y...@gmail.com wrote: > Hi All, > > I forgot the syntax of making a button flash, and failed to find an example > in the web. I use Tkinter, to create a button. Then made it packed, and > showed up. Now I am trying to make button b flashing,

How to make a button flashing?

2018-06-13 Thread huey . y . jiang
Hi All, I forgot the syntax of making a button flash, and failed to find an example in the web. I use Tkinter, to create a button. Then made it packed, and showed up. Now I am trying to make button b flashing, to make it get better noticed. I checked the docs, and found a method flash() is avai

What is the trick between these?

2016-08-15 Thread huey . y . jiang
Hi All, I am trapped by these two funny things: class MyClass(upClass): def start(self): ***do_menu_here self.load_label_image() # ---> this works self.load_canvas_image() # ---> this does not work def load_label_image(self): img = PhotoImage(file="xx.g

Re: Why my image cannot be displayed?

2016-08-13 Thread huey . y . jiang
On Friday, August 12, 2016 at 9:40:15 PM UTC-4, huey.y...@gmail.com wrote: > Hi All, > > Image display drives me crazy. After I get it displayed, and want to do the > job with a class, display failed again. Please take a look at my trial code: > > from Tkinter import * > > class imageDisplay: >

Why my image cannot be displayed?

2016-08-12 Thread huey . y . jiang
Hi All, Image display drives me crazy. After I get it displayed, and want to do the job with a class, display failed again. Please take a look at my trial code: from Tkinter import * class imageDisplay: def __init__(self, parent=None): canvas = Canvas(width=400, height=3

Re: Is it possible to draw a BUTTON?

2016-07-28 Thread huey . y . jiang
On Wednesday, July 27, 2016 at 10:00:47 PM UTC-4, Rick Johnson wrote: > On Wednesday, July 27, 2016 at 7:15:20 PM UTC-5, MRAB wrote: > > On 2016-07-28 00:13, huey.y.ji...@gmail.com wrote: > > > On Wednesday, July 27, 2016 at 4:18:29 PM UTC-4, huey.y...@gmail.com > > > wrote: > > >> Hi Folks, > > >

Re: Is it possible to draw a BUTTON?

2016-07-27 Thread huey . y . jiang
On Wednesday, July 27, 2016 at 4:18:29 PM UTC-4, huey.y...@gmail.com wrote: > Hi Folks, > > It is common to put a BUTTON on a canvas by the means of coding. However, in > my application, I need to draw a circle on canvas, and then make this circle > to work as if it is a button. When the circle

Re: Is it possible to draw a BUTTON?

2016-07-27 Thread huey . y . jiang
On Wednesday, July 27, 2016 at 4:18:29 PM UTC-4, huey.y...@gmail.com wrote: > Hi Folks, > > It is common to put a BUTTON on a canvas by the means of coding. However, in > my application, I need to draw a circle on canvas, and then make this circle > to work as if it is a button. When the circle

Is it possible to draw a BUTTON?

2016-07-27 Thread huey . y . jiang
Hi Folks, It is common to put a BUTTON on a canvas by the means of coding. However, in my application, I need to draw a circle on canvas, and then make this circle to work as if it is a button. When the circle is clicked, it triggers a new image to be displayed. Somebody can help? Thanks! -- h

Re: Image loading problem

2016-05-21 Thread huey . y . jiang
Thanks so much! All of methods works! -- https://mail.python.org/mailman/listinfo/python-list