0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

PythonGUIによる簡易営業ツール作成:社員番号検索

Posted at

#Pythonで簡易営業ツール作成方法:社員番号検索
営業でちょっとしたときに作成したツールを共有します。
Googleで調べながらSpyder(Python3.7)で作成してみました。

import tkinter as tk
root=tk.Tk()
root.geometry('300x200')
root.title('社員')
def btn_click():
    x=txt_1.get()
    if x=="田中":
        txt_2.insert(0,1)     
    elif x=="鈴木":
        txt_2.insert(0,2)
    elif x=="山田":
        txt_2.insert(0,3)
    else:
        txt_2.insert(0,"該当なし")
lbl_1 = tk.Label(text='苗字')
lbl_1.place(x=30, y=70)
lbl_2 = tk.Label(text='社員番号')
lbl_2.place(x=30, y=100)
txt_1 = tk.Entry(width=20)
txt_1.place(x=90, y=70)
txt_2 = tk.Entry(width=20)
txt_2.place(x=90, y=100)
btn = tk.Button(root, text='実行', command=btn_click)
btn.place(x=140, y=170)
root.mainloop()
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?