Re: Python GUI questions

2013-03-31 Thread Jan Riechers
On 19.03.2013 21:01, maiden129 wrote: Hello, I'm using python 3.2.3 and I'm making a program that show the of occurrences of the character in the string in Tkinter. My questions are: How can I make an empty Entry object that will hold a word that a user will enter? How to make an empty Entr

Re: Python GUI questions

2013-03-20 Thread Rick Johnson
On Tuesday, March 19, 2013 10:21:06 PM UTC-5, Terry Reedy wrote: > On 3/19/2013 10:16 PM, Ranting Rick wrote: > > [snip code] > > when I run this, and click the button, I get: > >TypeError: cbButton() missing 1 required positional argument: 'self' > > ...when I remove 'self' from cbButton, I

Re: Python GUI questions

2013-03-19 Thread Terry Reedy
On 3/19/2013 10:16 PM, Ranting Rick wrote: import tkinter as tk from tkinter.constants import LEFT def cbButton(self): print('I should do something here!') root = tk.Tk() root.title("Window") w=tk.Label(root, text="Enter a string") w.pack(side=LEFT) e1 = tk.Entry(root, bd=5) e1.pack(side=L

Re: Python GUI questions

2013-03-19 Thread Rick Johnson
On Tuesday, March 19, 2013 9:36:28 PM UTC-5, maiden129 wrote: > So should I redo my other code that I created with > the radioButtons to change the colors of a text? I believe so. Although you really should explain what your trying to achieve with this code. There is nothing wrong with wrapping

Re: Python GUI questions

2013-03-19 Thread maiden129
On Tuesday, March 19, 2013 10:16:25 PM UTC-4, Rick Johnson wrote: > On Mar 19, 8:25 pm, maiden129 wrote: So should I redo my other code that I created with the radioButtons to change the colors of a text? from tkinter import * class buttons: def __init__(self): window = Tk()

Re: Python GUI questions

2013-03-19 Thread Ranting Rick
On Mar 19, 8:25 pm, maiden129 wrote: > Here is my try to answer some of questions: > > [snip code] I don't understand why you are wrapping this code into a class. Are you trying to create something reuseable? > I'm just struggling with only how to create an object that > will hold a single chara

Re: Python GUI questions

2013-03-19 Thread Jason Swails
On Tue, Mar 19, 2013 at 9:25 PM, maiden129 wrote: > On Tuesday, March 19, 2013 8:57:42 PM UTC-4, Rick Johnson wrote: > > On Tuesday, March 19, 2013 2:01:24 PM UTC-5, maiden129 wrote: > > > > > Hello, > > > > > > > > > > I'm using python 3.2.3 and I'm making a program that show > > > > > the of occ

Re: Python GUI questions

2013-03-19 Thread maiden129
On Tuesday, March 19, 2013 8:57:42 PM UTC-4, Rick Johnson wrote: > On Tuesday, March 19, 2013 2:01:24 PM UTC-5, maiden129 wrote: > > > Hello, > > > > > > I'm using python 3.2.3 and I'm making a program that show > > > the of occurrences of the character in the string in > > > Tkinter. > > >

Re: Python GUI questions

2013-03-19 Thread Rick Johnson
On Tuesday, March 19, 2013 2:01:24 PM UTC-5, maiden129 wrote: > Hello, > > I'm using python 3.2.3 and I'm making a program that show > the of occurrences of the character in the string in > Tkinter. > > My questions are: > > How can I make an empty Entry object that will hold a word > that a use

Re: Python GUI questions

2013-03-19 Thread maiden129
On Tuesday, March 19, 2013 5:39:51 PM UTC-4, Chris Angelico wrote: > On Wed, Mar 20, 2013 at 6:01 AM, maiden129 wrote: > > > Hello, > > > > > > I'm using python 3.2.3 and I'm making a program that show the of > > occurrences of the character in the string in Tkinter. > > > > This sounds like

Re: Python GUI questions

2013-03-19 Thread Chris Angelico
On Wed, Mar 20, 2013 at 6:01 AM, maiden129 wrote: > Hello, > > I'm using python 3.2.3 and I'm making a program that show the of occurrences > of the character in the string in Tkinter. This sounds like homework. Have you had a try at it yourself before asking? If so, show us your code, and point

Python GUI questions

2013-03-19 Thread maiden129
Hello, I'm using python 3.2.3 and I'm making a program that show the of occurrences of the character in the string in Tkinter. My questions are: How can I make an empty Entry object that will hold a word that a user will enter? How to make an empty Entry object that will hold a single charact