#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2013
    Posts
    2
    Rep Power
    0

    Help creating a task manager


    Hey guys, I'm completely new to tkinter but I am trying to create a simple task manager. All it does is it allows the user to enter a task with the date and time and it stores the task in a label that can be viewed and later edited/deleted. On paper it would look something like this:



    Check buttons are used to be able to select which task to be edited/deleted. Unless someone comes up with something easier/simple i will stick with this.

    I have already started working on it. Its not much but this is what i have til now:

    Code:
    import sys
    from Tkinter import *
    mGui = Tk()
    
    mGui.geometry("450x450+400+100")
    mGui.title("Task manager")
    
    def inputl():
        ltext = firstT.get()
        label1 = Label(mGui,text=ltext).pack()
        return
    
    
    firstT=StringVar()
        
    message = "Enter task"
    Label(mGui, text=message).pack()
    entry1= Entry(mGui, textvariable=firstT).pack()
    Button1 = Button(mGui, text='OK', command=inputl).pack()
        
    
    
    Button(mGui, text="Add", command=inputl).pack(side=TOP, ipadx=50)
    Button(mGui, text="Edit").pack(side=TOP, ipadx=51)
    Button(mGui, text="Delete").pack(side=TOP, ipadx=44)  
    
    mGui.mainloop()
    I would appreciate it if I could get some help to finish this program ASAP. Thanks a lot !
  2. #2
  3. Contributing User
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Aug 2011
    Posts
    4,711
    Rep Power
    480
    Remove the OK button, and include an undo feature. 1 level undo is sufficient.
    [code]Code tags[/code] are essential for python code and Makefiles!
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2013
    Posts
    2
    Rep Power
    0
    Im having trouble linking the check buttons with my labels and the edit/delete button. So when I have one check button next to one of the labels active, and I press either the delete or edit, it will allow me to edit/delete whatever is in that specific label. Is there a way to do code that idea?
  6. #4
  7. Contributing User
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Aug 2011
    Posts
    4,711
    Rep Power
    480
    Where you pack a label for the text of a task instead pack a frame. Into that frame pack(side=Tkinter.LEFT) the label and the check button side=Tkinter.LEFT . You'll need to keep track of the information in the labels, maybe use Tkinter.StringVar with the textvariable configuration for editing. And you'll need to associate the check button with the label. You could keep an array of the Frames then look for children of the frame---a clumsy solution. I'm sure you can think of something more direct.
    [code]Code tags[/code] are essential for python code and Makefiles!

IMN logo majestic logo threadwatch logo seochat tools logo