Skip to content

Unable to update scrolling_label text outside constructor #182

Closed
@VinceVega7

Description

@VinceVega7

Hi,

It seems that you can not update the text of a scrolling_label outside the constructor.
If outside the constructor but before the showing the display, if I update it to "test" it still retains "Hello World"

eg.

import displayio
import terminalio
import time
from adafruit_matrixportal.matrix import Matrix
from adafruit_display_text.scrolling_label import ScrollingLabel

matrix = Matrix()
display = matrix.display


# setup the label
font = terminalio.FONT
splash = displayio.Group()

title_label = ScrollingLabel(
    text="Hello World", font=font, color=0xFFFFFF, scale=1,
    anchored_position=(0, 0), anchor_point=(0, 0),
)

#### Here this does not work
title_label.text = "test"

splash.append(title_label)
display.show(splash)

while True:

   title_label.update()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions