GUI creation in python using tkinter 2

Overview

Continued from last time Last time I was able to confirm that the application started for the time being, but I tried adding various missing parts such as prevention of double startup

Things necessary

Publication place

It is published on github. https://github.com/snowpff14/etcresource/tree/master/pythonGui

Processing content

See Last time for a rough part.


    def doExecute(self):
        if self.lock.acquire(blocking=FALSE):
            if messagebox.askokcancel('Confirmation before execution','Do you want to perform the process?'):
                self.progressValue=0
                self.progressStatusBar.configure(value=self.progressValue)
                self.progressBar.configure(maximum=10,value=0)
                self.progressBar.start(100)
                th = threading.Thread(target=self._executer)
                th.start()
            else:
                self.lock.release()
        else:
            messagebox.showwarning('error','Processing is in progress')

        labelStyle=ttk.Style()
        labelStyle.configure('PL.TLabel',font=('Helvetica',10,'bold'),background='white',foreground='red')
        self.progressMsgBox=ttk.Label(content,textvariable=self.progressMsg,width=70,style='PL.TLabel')
        self.progressMsg.set('Waiting for processing')

    def progressSequence(self,msg,sequenceValue=0):
        self.progressMsg.set(msg)
        self.progressValue=self.progressValue+sequenceValue
        self.progressStatusBar.configure(value=self.progressValue)

        self.progressMsgBox.after(10,self.progressSequence('Processing is in progress',sequenceValue=50))
        root.update_idletasks()

        self.progressBar=ttk.Progressbar(content,orient=HORIZONTAL,length=140,mode='indeterminate')
        self.progressBar.configure(maximum=10,value=0)

        self.progressStatusBar=ttk.Progressbar(content,orient=HORIZONTAL,length=140,mode='determinate')
                self.progressValue=0
                self.progressStatusBar.configure(value=self.progressValue)
                self.progressBar.configure(maximum=10,value=0)
                self.progressBar.start(100)
    def preparation(self,logfilename):
        self._executer=partial(self.execute,logfilename)

So far this time for the time being. If I can do something a little more, I will create a continuation.

Recommended Posts

GUI creation in python using tkinter 2
GUI creation in python using tkinter part 1
GUI programming in Python using Appjar
Create a python GUI using tkinter
About building GUI using TKinter of Python
[GUI in Python] PyQt5-Dialog-
[GUI in Python] PyQt5 -Widget-
Introducing GUI: PyQt5 in Python
Translate using googletrans in Python
Using Python mode in Processing
Basics of I / O screen using tkinter in python3
Try to make it using GUI and PyQt in Python
Precautions when using pit in Python
Linebot creation & file sharing in Python
Try using LevelDB in Python (plyvel)
Using global variables in python functions
Let's see using input in python
Infinite product in Python (using functools)
Edit videos in Python using MoviePy
[Python GUI] DICOM contrast adjustment and BMP conversion using Tkinter
I tried to make a stopwatch using tkinter in python
[GUI in Python] PyQt5-Menu and Toolbar-
Try using Leap Motion in Python
Depth-first search using stack in Python
When using regular expressions in Python
Notes using cChardet and python3-chardet in Python 3.3.1.
Try using the Wunderlist API in Python
Periodic execution processing when using tkinter [Python3]
Get Suica balance in Python (using libpafe)
(Bad) practice of using this in Python
Slowly hash passwords using bcrypt in Python
Try using the Kraken API in Python
Using venv in Windows + Docker environment [Python]
Create a simple GUI app in Python
[FX] Hit oanda-API in Python using Docker
Tweet using the Twitter API in Python
[Python] [Windows] Serial communication in Python using DLL
I tried using Bayesian Optimization in Python
Log in to Slack using requests in Python
Get Youtube data in Python using Youtube Data API
Using physical constants in Python scipy.constants ~ constants e ~
Scraping a website using JavaScript in Python
Develop slack bot in python using chat.postMessage
Tkinter could not be imported in Python
Write python modules in fortran using f2py
Draw a tree in Python 3 using graphviz
Notes for using python (pydev) in eclipse
Disease classification in Random Forest using Python
Download files in any format using Python
Parallel task execution using concurrent.futures in Python
Notes on using code formatter in Python
GUI display train delay information using python
Meaning of using DI framework in Python
Quadtree in Python --2
Try using Tkinter
Python in optimization
CURL in python
Metaprogramming in Python
Python 3.3 in Anaconda
SendKeys in Python
Epoch in Python