Skip to content

Commit 2e55bd9

Browse files
authored
Merge pull request #90 from RetiredWizard/main
Replace depreciated .show()
2 parents 968d47d + 37e4576 commit 2e55bd9

22 files changed

+24
-24
lines changed

adafruit_displayio_layout/widgets/cartesian.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ class Cartesian(Widget):
9898
9999
.. code-block:: python
100100
101-
display.show(my_plane) # add the group to the display
101+
display.root_group = my_plane # add the group to the display
102102
103103
If you want to have multiple display elements, you can create a group and then
104104
append the plane and the other elements to the group. Then, you can add the full
@@ -114,7 +114,7 @@ class Cartesian(Widget):
114114
# Append other display elements to the group
115115
#
116116
117-
display.show(my_group) # add the group to the display
117+
display.root_group = my_group # add the group to the display
118118
119119
120120
**Summary: Cartesian Features and input variables**

adafruit_displayio_layout/widgets/switch_round.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ class SwitchRound(Widget, Control):
148148
149149
.. code-block:: python
150150
151-
display.show(my_switch) # add the group to the display
151+
display.root_group = my_switch # add the group to the display
152152
153153
If you want to have multiple display elements, you can create a group and then
154154
append the switch and the other elements to the group. Then, you can add the full
@@ -164,7 +164,7 @@ class SwitchRound(Widget, Control):
164164
# Append other display elements to the group
165165
#
166166
167-
display.show(my_group) # add the group to the display
167+
display.root_group = my_group # add the group to the display
168168
169169
For a full example, including how to respond to screen touches, check out the
170170
following examples in the `Adafruit_CircuitPython_DisplayIO_Layout

adafruit_displayio_layout/widgets/widget.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ class Widget(displayio.Group):
122122
The Widget class has several options for setting the widget position on the screen.
123123
In the simplest case, you can define the widget's *.x* and *.y* properties to set
124124
the position. (**Reminder**: If your widget is directly shown by the display using
125-
*display.show(my_widget)*), then the *.x* and *.y* positions will be in the display's
125+
*display.root_group=my_widget*), then the *.x* and *.y* positions will be in the display's
126126
coordinate system. But if your widget is held inside of another Group, then its
127127
coordinates will be in that Group's coordinate system.)
128128

examples/displayio_layout_cartesian_advanced_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
)
7070
my_group.append(car5)
7171

72-
display.show(my_group)
72+
display.root_group = my_group
7373

7474
while True:
7575
pass

examples/displayio_layout_cartesian_lineplot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
my_group = displayio.Group()
3232
my_group.append(my_plane)
33-
display.show(my_group) # add high level Group to the display
33+
display.root_group = my_group # add high level Group to the display
3434

3535
data = [
3636
# (0, 0), # we do this point manually - so we have no wait...

examples/displayio_layout_cartesian_simpletest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737

3838
my_group = displayio.Group()
3939
my_group.append(my_plane)
40-
display.show(my_group) # add high level Group to the display
40+
display.root_group = my_group # add high level Group to the display
4141

4242
posx = 0
4343
posy = 0

examples/displayio_layout_flip_input_simpletest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
my_group.append(my_flip2)
9898
my_group.append(my_flip3)
9999

100-
display.show(my_group) # add high level Group to the display
100+
display.root_group = my_group # add high level Group to the display
101101
display.auto_refresh = True
102102

103103
while True:

examples/displayio_layout_grid_layout_get_cell_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
# Make the display context
2020
main_group = displayio.Group()
21-
display.show(main_group)
21+
display.root_group = main_group
2222

2323
layout = GridLayout(
2424
x=10,

examples/displayio_layout_gridlayout_dividers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
# Make the display context
1919
main_group = displayio.Group()
20-
display.show(main_group)
20+
display.root_group = main_group
2121

2222
layout = GridLayout(
2323
x=10,

examples/displayio_layout_gridlayout_pygame_display_simpletest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
display = PyGameDisplay(width=320, height=240)
2020
main_group = displayio.Group()
21-
display.show(main_group)
21+
display.root_group = main_group
2222

2323
layout = GridLayout(
2424
x=10,

0 commit comments

Comments
 (0)