반응형
Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | ||||
| 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 11 | 12 | 13 | 14 | 15 | 16 | 17 |
| 18 | 19 | 20 | 21 | 22 | 23 | 24 |
| 25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- c#
- 파이썬
- google apps script
- Apache
- Python
- Google Excel
- dataframe
- array
- Excel
- Redshift
- PANDAS
- Kotlin
- numpy
- Tkinter
- Google Spreadsheet
- GIT
- list
- SQL
- gas
- math
- PySpark
- Java
- django
- string
- Github
- matplotlib
- PostgreSQL
- hive
- Presto
Archives
- Today
- Total
달나라 노트
Python tkinter : title (Window의 제목 설정) 본문
728x90
반응형
title method를 이용하면 Window의 제목을 설정할 수 있습니다.
import tkinter as tk
window = tk.Tk()
window.mainloop()
위 코드는 아주 단순한 코드입니다.
Window를 열어주는 코드이죠.

그 결과는 위와 같습니다.
근데 가장 위쪽을 보면 tk라고 적혀있습니다.
이것이 Window의 제목인데 tk는 그냥 기본 제목입니다.
이것을 재설정하려면 title method를 이용하면 됩니다.
아래 코드를 보시죠.
import tkinter as tk
window = tk.Tk()
window.title('This is new title.')
window.mainloop()

위 코드를 실행시키면 Window의 제목이 바뀌어있습니다.
- window.title('This is new title.')
사용법은 간단합니다. 위처럼 title method의 인자로서 내가 원하는 문자를 넣어주면 그것이 title이 됩니다.
728x90
반응형
'Python > Python tkinter' 카테고리의 다른 글
Comments