Skip to content

Commit 2cb0c29

Browse files
committed
fix example code
1 parent 73aaa01 commit 2cb0c29

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

examples/pyportal.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import displayio
77

88
from adafruit_bitmap_font import bitmap_font
9-
from adafruit_display_text.text_area import TextArea
9+
from adafruit_display_text.label import Label
1010

1111
backlight = pulseio.PWMOut(microcontroller.pin.PB21) #pylint: disable=no-member
1212

@@ -31,7 +31,7 @@
3131
for demo_text in demos:
3232
for font in fonts:
3333
print("Font load {}".format(font.name))
34-
area = TextArea(font, text=demo_text)
34+
area = Label(font, text=demo_text)
3535
area.y = y
3636
splash.append(area)
3737

examples/textarea_boundingbox.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import os
22
import board
33
import displayio
4-
from adafruit_display_text.text_area import TextArea
4+
from adafruit_display_text.label import Label
55
from adafruit_bitmap_font import bitmap_font
66

77
# the current working directory (where this file is)
@@ -37,7 +37,7 @@
3737

3838
print(DISPLAY_STRING)
3939

40-
text = TextArea(font, text=DISPLAY_STRING)
40+
text = Label(font, text=DISPLAY_STRING)
4141
text.x = 20
4242
text.y = 100
4343
text.color = 0x0

0 commit comments

Comments
 (0)