Multiline St.Entry with wrapping and scrollbar


I’m trying to create a multiline St.Entry with line wrapping and a scrollbar, but for some reason the scrollbar never appears, no matter how many lines of text the St.Entry contains. Here’s code:

const entry = new St.Entry({
    text: `Some very long multiline text`,
    x_expand: true,
entry.clutter_text.single_line_mode = false;
entry.clutter_text.activatable = false;
entry.clutter_text.line_wrap = true;
entry.clutter_text.line_wrap_mode = Pango.WrapMode.WORD_CHAR;

const layout = new St.BoxLayout();

const scrollView = new St.ScrollView({
    hscrollbar_policy: St.PolicyType.NEVER,
    vscrollbar_policy: St.PolicyType.AUTOMATIC,
    width: 600,

const dialog = new ModalDialog.ModalDialog();
    isDefault: true,
    key: Clutter.KEY_Escape,
    label: 'Close',
    action: () => dialog.close(),

What am I doing wrong?

The solution is to use Clutter.Text instead of St.Entry.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.