# ZTextLine

- text line with text “TextLine”

- in disabled state

- with custom palette

ZTextLine is a widget that simply displays a single line of text.

In contrast to labels it does not reserve a cell as focus indicator and does not support forwarding focus to a “buddy” widget nor does it support showing a keyboard shortcut.

See also: `Tui::ZLabel`, `Tui::ZTextLayout`

## Example

    Tui::ZTextLine *text = new Tui::ZTextLine("Heading", dialog);
    layout->addWidget(text);

## Keyboard Usage

This widget does not react to any keyboard input.

## Behavior

Labels by default don’t accept focus, are one cell high and have a expanding vertical layout policy. The size request of a label is the length of the text plus the contents margins.

The widget does not have visual distinct disabled or focused states.

## Palette

Palette Color | Usage
--- | ---
`control.fg`, `control.bg` | Body of the text line widget

## ZTextLine

class Tui::ZTextLine : public Tui::ZWidget

  A simple text label widget without “buddy” widget support.

  Constructors

  ZTextLine(const QString &text, Tui::ZWidget *parent = nullptr)
  ZTextLine(WithMarkupTag, const QString &markup, Tui::ZWidget *parent = nullptr)

    Create the text line widget with the given `text` or `markup`.

  Functions

  QString text() const
  void setText(const QString &text)

    Get or set the plain text content of the text line widget.

    When the content of the text line widget was most recently set using `setMarkup()` the returned text is empty.

  QString markup() const
  void setMarkup(const QString &markup)

    Get or set the text content of the text line widget using markup.

    When the content of the text line widget was most recently set using `setText()` the returned markup is empty.