Method

GtkEntryset_placeholder_text

since: 3.2

Declaration [src]

void
gtk_entry_set_placeholder_text (
  GtkEntry* entry,
  const gchar* text
)

Description [src]

Sets text to be displayed in entry when it is empty and unfocused. This can be used to give a visual hint of the expected contents of the GtkEntry.

Note that since the placeholder text gets removed when the entry received focus, using this feature is a bit problematic if the entry is given the initial focus in a window. Sometimes this can be worked around by delaying the initial focus setting until the first key event arrives.

Available since: 3.2

Parameters

text

Type: const gchar*

A string to be displayed when entry is empty and unfocused, or NULL.

The argument can be NULL.
The data is owned by the caller of the method.
The value is a NUL terminated UTF-8 string.