Today I came across a problem when using tkinter for GUI programming. Question 1.How to use the canvas.item_configure() method, for example, if I want to change a line's color from red to blue, how to arrange the parameters?
Question 2.Tkinter has a tkColorChooser and its return value is something like ((0, 255, 255), '#00ffff'), and I'm wondering how to use it. Normally the color used in function (like mycanvas.create_line(ax,ay,bx,by,fill=color)) is in words such as 'red' or 'gray', how could I make the program recognize the numbers? Question 3. Suppose there are several separate lines in my canvas, all are created in one single function like 'createThings()'. What should I do so that when I choose a color from the tkColorChoose, all of them change their colors, like all change from red to ((0, 255, 255), '#00ffff')? It seems I can place a color parameter in the function createThings() and any functions inside it(create_line, create_oval and so on) take this parameter as the color to fill, but how to change the color parameter then? How can it be accessed and modified by other function(something like ChangeColor)?You don't need to answer this step be step, just some tips for the essentials would be enough. Any help would be appreciated!
_______________________________________________ Tkinter-discuss mailing list Tkinter-discuss@python.org http://mail.python.org/mailman/listinfo/tkinter-discuss