Python Gtk.Entry placeholder text

0 votes
I have a login-window with two gtk.Entry objects. The first one is for username and the second one is for password. How to add some Ghosttext to the Entry, so there is written "Username" in the Entry but if you click inside the text, it dissapears?

Can anyone help me with this?
Apr 17 in Python by ana1504.k
• 5,990 points
31 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes
Starting with Gtk+ 3.2 it's possible to set placeholder text.

entry = Gtk.Entry()
entry.set_placeholder_text("I am a placeholder")
answered Apr 17 by SDeb
• 9,540 points

Related Questions In Python

0 votes
1 answer

Deleting a dictionary entry in Python

Use pop(): mapping.pop("key_x") #key_x is a key entry Note ...READ MORE

answered May 2, 2018 in Python by Nietzsche's daemon
• 4,260 points
27 views
0 votes
1 answer

How to get text label from SAP using pywinauto[python]

Hi. Can you please tell me what ...READ MORE

answered Jun 28, 2018 in Python by Nietzsche's daemon
• 4,260 points
204 views
0 votes
1 answer

Python: how to print long text on different lines?

replace with a newline char. file.write(response.read().decode('utf-8').replace(";","\n")) In [72]: ...READ MORE

answered Sep 5, 2018 in Python by slayer
• 29,040 points
17 views
0 votes
1 answer

Getting some errors regarding python when using sublime text

I don't know if you still need ...READ MORE

answered Sep 7, 2018 in Python by charlie_brown
• 7,710 points
22 views
0 votes
1 answer

how can i count the items in a list?

suppose you have a list a = [0,1,2,3,4,5,6,7,8,9,10] now ...READ MORE

answered May 2 in Python by Mohammad
• 1,400 points
20 views
0 votes
1 answer

Python sort() function arguments

Both sort and sorted have three keyword arguments: cmp, key and reverse. L.sort(cmp=None, key=None, reverse=False) -- ...READ MORE

answered Oct 8, 2018 in Python by SDeb
• 9,540 points
135 views
0 votes
1 answer

How is Python 2.7.3 and Python 3.3 different?

raw_input() is not used in Python 3. Use input()  ...READ MORE

answered Sep 12, 2018 in Python by SDeb
• 9,540 points
21 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.