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
893 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,300 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
528 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
2,306 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,350 points
1,236 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 8, 2018 in Python by charlie_brown
• 7,720 points
453 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 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 4,051 views
0 votes
1 answer
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,300 points
597 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,300 points
7,419 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP