set_text


Description:

public void set_text (string text, int length)

Sets the text of the layout.

This function validates text and renders invalid UTF-8 with a placeholder glyph.

Note that if you have used set_markup or set_markup_with_accel on this before, you may want to call set_attributes to clear the attributes set on the layout from the markup as this function does not clear attributes.

Parameters:

this

a Layout

text

the text

length

maximum length of text, in bytes. -1 indicates that the string is nul-terminated and the length should be calculated. The text will also be truncated on encountering a nul-termination even when length is positive.