GNOME Bugzilla – Bug 566741
add placeholder text support to GtkEntry
Last modified: 2009-01-06 14:36:14 UTC
For some time, we've seen this being done in many text entries: the search entry in firefox, the search field in evolution, etc. Having a placeholder text, that is only visible when the entry is not focused and empty and acts only as an indicator of the nature of the input expected, looks like an interesting feature to have in GtkEntry. I will attach an initial patch to implement this. It works fine but in RTL environments seems to break. What still needs to be improved is the positioning of the text layout, as this is currently (ab)using the position for the normal text. I'd appreciate some guidance on this in order to finish the patch.
Created attachment 125837 [details] [review] initial patch This patch adds the "placeholder-text" property, accessors, and the initial implementation. I modified the entry completion demo in gtk-demo as a simple example.
*** This bug has been marked as a duplicate of 440963 ***