Add Reset method for the StyledParagraph component

This commit is contained in:
Adrian-George Bostan 2018-09-24 18:25:05 +03:00
parent 4ec03343b2
commit 2f30e325eb

View File

@ -104,6 +104,11 @@ func (p *StyledParagraph) Append(text string, style TextStyle) {
p.wrapText()
}
func (p *StyledParagraph) Reset(text string, style TextStyle) {
p.chunks = []TextChunk{}
p.Append(text, style)
}
// SetTextAlignment sets the horizontal alignment of the text within the space provided.
func (p *StyledParagraph) SetTextAlignment(align TextAlignment) {
p.alignment = align