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

Text entry controls - Python Tutorial

From the course: Rapid Application Development with Python

Start my 1-month free trial

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…

Contents