Seite 1 von 1

progress bar..

Verfasst: Sonntag 7. Juni 2009, 17:56
von bugsy25
Hallo,

ich erstelle gerade ein kleine Interface für meine Software. Die Interface soll ein "progress bar" haben, das löst aus, wenn die Software startet und gibt eine Nachricht 'finish', wenn das Programm zu Ende ist.

Hier ist meine code:

Code: Alles auswählen


# -*- coding: cp1252 -*-
from Tkinter import*
from PIL import Image, ImageTk
from DCM import*
import Tkinter, tkFileDialog
import os

#---------------------function's definition---------------------------------

def creeDialog1():
    """
    create a dialog for the selection of the to be classified files....
    """
    dirname1=    tkFileDialog.askdirectory(parent=root,initialdir="/",title='Please select a directory')
    dirInLab=Label(root,text='Infile:'+ dirname1)
    dirInLab.pack()
    return str(dirname1)

def creeDialog2():
    """
    create a dialog for the selection of the classification's directory....
    """
    dirname2= tkFileDialog.askdirectory(parent=root,initialdir="/",title='Please select a directory for the classification')
    dirOutLab=Label(root,text='Outfile:'+ dirname2)
    dirOutLab.pack()
    return str(dirname2)

def creeWindow():
    """
    create a window with a button'Close'that will be destroy after  its release..
    """
    fen=Tk()
    fen.title('Welcome to v1.00')
    tex=Label(fen,text='This the description of....',fg='red')
    tex.pack()
    bou=Button(fen,text='Close',command=fen.destroy)
    bou.pack()

def dcm(dirs1,dirs2):
    """
    callback the function Classification from DCM and execute
    this one...
    """
    os.chdir(dirs2)
    Classification(dirs1)
    

def test():
    """
    """
    call_Dialog1=creeDialog1()
    call_Dialog2=creeDialog2()
    dcm(call_Dialog1,call_Dialog2)
    
    

#---------------------main programm---------------------------------

if __name__ == '__main__':
    
    root=Tkinter.Tk()
    root.resizable(False,False)
    root.title('Welcome to v1.00')
    image=Image.open('log.png')
    photo=ImageTk.PhotoImage(image)
    Label_photo=Label(root,image=photo).pack(side=RIGHT)

    tex1=Label(root,text='This programm....',fg='blue')
    tex1.pack()

    tex2=Label(root,text='(c)2009')
    tex2.pack(side=LEFT)
    
    bou1=Button(root,text='Start',command=test)
    bou1.pack(side=LEFT)
    

    bou2=Button(root,text='Help',command=creeWindow) 
    bou2.pack(side=RIGHT)       


    root.mainloop()

Danke im Voraus!

Bugsy!

Edit (Leonidas): Code in Python-Tags gesetzt.

Re: progress bar..

Verfasst: Sonntag 7. Juni 2009, 18:00
von Leonidas
bugsy25 hat geschrieben:Danke im Voraus!
Gern geschehen!

Fällt dir was auf?

Verfasst: Sonntag 7. Juni 2009, 18:25
von busfahrer
Ist das jetzt sowas wie
Danke für garnichts
und
Gern geschehen für noch weniger :lol:

Verfasst: Sonntag 7. Juni 2009, 19:53
von derdon
Wenn man sich im Voraus für "noch keine Hilfe" bedankt, dann kann man auch im Voraus für "noch keine Hilfe" Bitte sagen.

Verfasst: Sonntag 7. Juni 2009, 20:41
von problembär

Verfasst: Sonntag 7. Juni 2009, 20:53
von Leonidas
derdon hat geschrieben:Wenn man sich im Voraus für "noch keine Hilfe" bedankt, dann kann man auch im Voraus für "noch keine Hilfe" Bitte sagen.
Naja, da bugsy25 in seinem Posting keine Frage stellt, habe ich mir gedacht, dass sich die Sache erledigt hat :)

Oder das war ein Posting vom Typ "Hier ist der Code - macht mal", aber sowas wollen wir doch niemandem grundlos unterstellen.

Verfasst: Sonntag 7. Juni 2009, 21:37
von bugsy25
Leonidas hat geschrieben:
derdon hat geschrieben:Wenn man sich im Voraus für "noch keine Hilfe" bedankt, dann kann man auch im Voraus für "noch keine Hilfe" Bitte sagen.
Naja, da bugsy25 in seinem Posting keine Frage stellt, habe ich mir gedacht, dass sich die Sache erledigt hat :)

Oder das war ein Posting vom Typ "Hier ist der Code - macht mal", aber sowas wollen wir doch niemandem grundlos unterstellen.
Sorry jungs! ich habe mich vielleicht falsch ausgedrückt..Ich versuche immer Französisch auf Deutsch zu übersetzen.
Also, ich brauche Hilfe um ein progress bar in meiner Code zu implementieren.
Übrigens,meine Code habe ich eingefügt um nicht jemand zu etwas zu zwingen sondern nur eine Überblick über meine Problematik zu geben.

Verfasst: Montag 8. Juni 2009, 00:22
von problembär
bugsy25 hat geschrieben:Also, ich brauche Hilfe um ein progress bar in meiner Code zu implementieren.
Fein. Links dazu siehe oben.

Gruß

Verfasst: Montag 8. Juni 2009, 08:41
von bugsy25
problembär hat geschrieben:
bugsy25 hat geschrieben:Also, ich brauche Hilfe um ein progress bar in meiner Code zu implementieren.
Fein. Links dazu siehe oben.

Gruß
Danke problembär!!!