filmov
tv
Python GUI Tutorial - 31 - Text - part 1

Показать описание
in this video we'll learn how to use Text widget to take input or displaying large text in tkinter application.
Along with creating it, we'll also learn about the options that we can use with Text widget in tkinter.
The option that we are going to learn in this video are as follows-
1. height = tells us how many number of lines we need in Text widget.
2. width = tells us number of characters in each line in Text widget.
3. padx = space between border and text in both right and left side.
4. pady = space between border and text in both top and left side.
5. bd = to change the border size.
6. selectbackground = to change the background of selected text.
7. font = to change the font family, size or style of the text.
8. wrap = to wrapping the text inside textbox. CHAR and WORD are to option to wrap.
code used in the video-
from tkinter import *
root = Tk()
text = Text(root, width=20, height=10, wrap=WORD, padx=10, pady=10, bd=5, selectbackground="blue")
------------------------------------------------
I'm sure your quries like -
- How to create text widgets in tkinter?
- How to create large entry in tkinter?
- How to display large Text in tkinter?
- How to change the height and width of Text widget in Tkinter?
- How to get space between border and text in Text widget in Tkinter?
- How to change border size in tkinter?
- How to change the color of selected Text in Textbox in tkinter?
- how to change font in tkinter?
- how to stop cropping words in tkinter text?
have been solved.
if you have any problem related with this video, then please let us know in comment box. we'll reply as soon as possible.
Contact us -
Along with creating it, we'll also learn about the options that we can use with Text widget in tkinter.
The option that we are going to learn in this video are as follows-
1. height = tells us how many number of lines we need in Text widget.
2. width = tells us number of characters in each line in Text widget.
3. padx = space between border and text in both right and left side.
4. pady = space between border and text in both top and left side.
5. bd = to change the border size.
6. selectbackground = to change the background of selected text.
7. font = to change the font family, size or style of the text.
8. wrap = to wrapping the text inside textbox. CHAR and WORD are to option to wrap.
code used in the video-
from tkinter import *
root = Tk()
text = Text(root, width=20, height=10, wrap=WORD, padx=10, pady=10, bd=5, selectbackground="blue")
------------------------------------------------
I'm sure your quries like -
- How to create text widgets in tkinter?
- How to create large entry in tkinter?
- How to display large Text in tkinter?
- How to change the height and width of Text widget in Tkinter?
- How to get space between border and text in Text widget in Tkinter?
- How to change border size in tkinter?
- How to change the color of selected Text in Textbox in tkinter?
- how to change font in tkinter?
- how to stop cropping words in tkinter text?
have been solved.
if you have any problem related with this video, then please let us know in comment box. we'll reply as soon as possible.
Contact us -
Комментарии