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, 2019 in Python by ana1504.k
• 7,910 points
405 views

1 answer to this question.

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, 2019 by SDeb
• 13,290 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
169 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
1,113 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,300 points
246 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,780 points
137 views
0 votes
2 answers
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 6, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 2,175 views
0 votes
0 answers
0 votes
1 answer

How do I set a Gtk.StatusIcon as Text?

I don't think that is possible. The ...READ MORE

answered Jul 31, 2019 in Python by SDeb
• 13,290 points
165 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
• 13,290 points
1,378 views