Skip to content

bitmap_label does not show text if not initialized with something. #97

Closed
@FoamyGuy

Description

@FoamyGuy

bitmap_label will not draw text if it's set after creation instead of passing text in the constructor

import board
import terminalio
from adafruit_display_text import bitmap_label
from adafruit_display_text import label

text = "Hello world"
# text_area = label.Label(terminalio.FONT, max_glyphs=50)  # regular label does show the text afterward.

text_area = bitmap_label.Label(terminalio.FONT)
# text_area = bitmap_label.Label(terminalio.FONT, text=" ") # if we init with a space it will show the text
text_area.text = text
text_area.x = 10
text_area.y = 10
board.DISPLAY.show(text_area)
while True:
    pass

I can take a look into making the bitmap_label work the same as label in this scenario. Also am curious if @kmatch98 have any ideas if you have a chance to take a look.

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