A TE)<T FlfcLp isjwt a
If you look at the interface design, you'll see that there are two different types of text field you will need to handle: short text and longer, multi-line text fields. To deal with these two needs, Python's tkinter library has two different widgets for each data-entry type:
Entry widget: for entering single lines of text
The Entry widget is what you'll use for most of the text fields. You can create an Entry widget like this:
my small field = Entry(app)
Remember -that Ï"' always need to the tkinter library + wst
One single line of text
Text widget: for longer, multi-line text
Because not all text data fits on a single line, tkinter has the Text widget. Think of email messages, Wikipedia pages, and word processing documents. For large multi-line data, you need something other than Entry. You need Text.
Multiple lines of text
mmmmmmmmmmmmmmt my large field = Text(app)
You tan enter large pieces of ' textual data in here.
Costellor I msan the fellow's name. Abbott: Who Costello: The guy on first. Abbott: Who. Costel is: Th* first baseman. Abbott; Who. Costello: Th* guy playing... Abbott: Who is on firstl Coatallo; I'm asking YOU who's on first. Abbott: That's the ntan's name. Costella: That's who's name? Abbott: 1«. Costello: Wall go ahead And. tell me. Abbott: That1s it. Costello: That's who? Abbott: Yes,
The Entry and Text fields should be enough to create the Head-Ex interface. But it's not enough to simply create the interface. You also need to
i m control the data inside it.
control text fields
Was this article helpful?