From the course: Rapid Application Development with Python
Unlock the full course today
Join today to access over 22,500 courses taught by industry experts or purchase this course individually.
Text entry controls - Python Tutorial
From the course: Rapid Application Development with Python
Text entry controls
- [Instructor] The main widget for text entry is the text control. Text controls are typically used in conjunction with labels and provide an entry field into which information can be typed. Let's put one in after line seven. Self.tc test equals wx.TextCtrl, self.panel has its parent wx ID ANY, to get to system object ID, text field will be blank to begin with and we'll position it at 60 comma 30. I'll define the size of the box. There's 80 pixels wide and the default, which has one line depth. In the event handler, I'll comment out the original print, and I'll use print self.tc test.GetValue to print out the contents of the text box. Okay, we can run this. I want to put text into the box. I can retrieve it. We can use a text control for large multiline text. This allows text to wrap outside of the visible box and provides a vertical scroll control. Let's update line eight. We'll change it's position to one…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
Introducing wxPython2m 13s
-
(Locked)
Class-based skeleton4m 37s
-
(Locked)
Labels and buttons3m 38s
-
(Locked)
More on buttons3m 33s
-
(Locked)
Checkboxes and radio buttons6m 43s
-
(Locked)
Text entry controls4m 36s
-
(Locked)
Use spinners to set values4m 58s
-
(Locked)
Create lists to select from6m 9s
-
(Locked)
Use combo boxes54s
-
(Locked)
Compose a menu bar6m 46s
-
(Locked)
Challenge36s
-
(Locked)
Solution2m 54s
-
-
-
-