- PyGTK - Drag and Drop
- PyGTK - Timeout
- PyGTK - Ruler Class
- PyGTK - Clipboard Class
- PyGTK - Calendar Class
- PyGTK - SpinButton Class
- PyGTK - DrawingArea Class
- PyGTK - Image Class
- PyGTK - Arrow Class
- PyGTK - Scrolledwindow Class
- PyGTK - Viewport Class
- PyGTK - ProgressBar Class
- PyGTK - Statusbar Class
- PyGTK - Paned Class
- PyGTK - TreeView Class
- PyGTK - AspectFrame Class
- PyGTK - Frame Class
- PyGTK - Notebook Class
- PyGTK - File Chooser Dialog
- PyGTK - Color Selection Dialog
- PyGTK - Font Selection Dialog
- PyGTK - AboutDialog Class
- PyGTK - MessageDialog Class
- PyGTK - Dialog Class
- PyGTK - Scrollbar Class
- PyGTK - Scale Class
- PyGTK - Range Class
- PyGTK - Adjustment Class
- PyGTK - Toolbar Class
- PyGTK - MenuBar, Menu & MenuItem
- PyGTK - RadioButton Class
- PyGTK - CheckButton Class
- PyGTK - ToggleButton Class
- PyGTK - ComboBox Class
- PyGTK - Layout Class
- PyGTK - EventBox Class
- PyGTK - Alignment Class
- PyGTK - ButtonBox Class
- PyGTK - Box Class
- PyGTK - Containers
- PyGTK - Event Handling
- PyGTK - Signal Handling
- PyGTK - Entry Class
- PyGTK - Label CLass
- PyGTK - Button Class
- PyGTK - Window Class
- PyGTK - Important Classes
- PyGTK - Hello World
- PyGTK - Environment
- PyGTK - Introduction
- PyGTK - Home
PyGTK Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
PyGTK - Entry Class
Entry widget is a single-pne text entry widget. If the entered text is longer than the allocation of the widget, the widget will scroll so that the cursor position is visible.
Entry field can be converted in password mode using set_visibipty() method of this class. Entered text is substituted by character chosen by invisible_char() method, default being * .
The Entry class has the following constructor −
gtk.Entry(max = 0)
Here, max stands for maximum length of entry field in characters. The parameter takes a numeric value (0-65536).
The following table shows the important methods of an Entry class −
S.NO | Methods and Description |
---|---|
1 | set_visibipty(visible) If false, the contents are obscured by replacing the characters with the default invisible character — * |
2 | set_invisible_char(char) The default * characters in the entry field are replaced by char |
3 | set_max_length(x) This sets the "max-length" property to the value of x. (0-65536) |
4 | set_text(str) This sets the "text" property to the value of str. The string in str replaces the current contents of the entry. |
5 | get_text() This returns the value of the "text" property which is a string containing the contents of the entry. |
6 | set_apgnment() This sets the "xapgn" property to the value of xapgn. set_apgnment() controls the horizontal positioning of the contents in the Entry field. |
The following signals are emitted by entry widget −
activate | This is emitted when the entry is activated either by user action or programmatically with the gtk.Widget.activate() method. |
backspace | This is emitted when the Backspace key is entered from the keyboard. |
copy-cppboard | This is emitted when the selection text in the entry is copied to the cppboard. |
cut-cppboard | This is emitted when the selection in the entry is cut and placed in the cppboard. |
paste-cppboard | This is emitted when the contents of the cppboard are pasted into the entry. |