Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Replace depreciated .show() #90

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions adafruit_displayio_layout/widgets/cartesian.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class Cartesian(Widget):

.. code-block:: python

display.show(my_plane) # add the group to the display
display.root_group = my_plane # add the group to the display

If you want to have multiple display elements, you can create a group and then
append the plane and the other elements to the group. Then, you can add the full
Expand All @@ -114,7 +114,7 @@ class Cartesian(Widget):
# Append other display elements to the group
#

display.show(my_group) # add the group to the display
display.root_group = my_group # add the group to the display


**Summary: Cartesian Features and input variables**
Expand Down
4 changes: 2 additions & 2 deletions adafruit_displayio_layout/widgets/switch_round.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ class SwitchRound(Widget, Control):

.. code-block:: python

display.show(my_switch) # add the group to the display
display.root_group = my_switch # add the group to the display

If you want to have multiple display elements, you can create a group and then
append the switch and the other elements to the group. Then, you can add the full
Expand All @@ -164,7 +164,7 @@ class SwitchRound(Widget, Control):
# Append other display elements to the group
#

display.show(my_group) # add the group to the display
display.root_group = my_group # add the group to the display

For a full example, including how to respond to screen touches, check out the
following examples in the `Adafruit_CircuitPython_DisplayIO_Layout
Expand Down
2 changes: 1 addition & 1 deletion adafruit_displayio_layout/widgets/widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ class Widget(displayio.Group):
The Widget class has several options for setting the widget position on the screen.
In the simplest case, you can define the widget's *.x* and *.y* properties to set
the position. (**Reminder**: If your widget is directly shown by the display using
*display.show(my_widget)*), then the *.x* and *.y* positions will be in the display's
*display.root_group=my_widget*), then the *.x* and *.y* positions will be in the display's
coordinate system. But if your widget is held inside of another Group, then its
coordinates will be in that Group's coordinate system.)

Expand Down
2 changes: 1 addition & 1 deletion examples/displayio_layout_cartesian_advanced_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
)
my_group.append(car5)

display.show(my_group)
display.root_group = my_group

while True:
pass
2 changes: 1 addition & 1 deletion examples/displayio_layout_cartesian_lineplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

my_group = displayio.Group()
my_group.append(my_plane)
display.show(my_group) # add high level Group to the display
display.root_group = my_group # add high level Group to the display

data = [
# (0, 0), # we do this point manually - so we have no wait...
Expand Down
2 changes: 1 addition & 1 deletion examples/displayio_layout_cartesian_simpletest.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

my_group = displayio.Group()
my_group.append(my_plane)
display.show(my_group) # add high level Group to the display
display.root_group = my_group # add high level Group to the display

posx = 0
posy = 0
Expand Down
2 changes: 1 addition & 1 deletion examples/displayio_layout_flip_input_simpletest.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
my_group.append(my_flip2)
my_group.append(my_flip3)

display.show(my_group) # add high level Group to the display
display.root_group = my_group # add high level Group to the display
display.auto_refresh = True

while True:
Expand Down
2 changes: 1 addition & 1 deletion examples/displayio_layout_grid_layout_get_cell_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

# Make the display context
main_group = displayio.Group()
display.show(main_group)
display.root_group = main_group

layout = GridLayout(
x=10,
Expand Down
2 changes: 1 addition & 1 deletion examples/displayio_layout_gridlayout_dividers.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

# Make the display context
main_group = displayio.Group()
display.show(main_group)
display.root_group = main_group

layout = GridLayout(
x=10,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

display = PyGameDisplay(width=320, height=240)
main_group = displayio.Group()
display.show(main_group)
display.root_group = main_group

layout = GridLayout(
x=10,
Expand Down
2 changes: 1 addition & 1 deletion examples/displayio_layout_gridlayout_simpletest.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

# Make the display context
main_group = displayio.Group()
display.show(main_group)
display.root_group = main_group

layout = GridLayout(
x=10,
Expand Down
2 changes: 1 addition & 1 deletion examples/displayio_layout_icon_animated_simpletest.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
main_group.append(icon_zoom)
main_group.append(icon_shrink)

display.show(main_group)
display.root_group = main_group


COOLDOWN_TIME = 0.25
Expand Down
2 changes: 1 addition & 1 deletion examples/displayio_layout_page_layout_advancedtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

# create and show main_group
main_group = displayio.Group()
display.show(main_group)
display.root_group = main_group

# create the page layout
test_page_layout = PageLayout(x=0, y=0)
Expand Down
2 changes: 1 addition & 1 deletion examples/displayio_layout_page_layout_simpletest.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

# create and show main_group
main_group = displayio.Group()
display.show(main_group)
display.root_group = main_group

# create the page layout
test_page_layout = PageLayout(x=0, y=0)
Expand Down
2 changes: 1 addition & 1 deletion examples/displayio_layout_pygame_display_switch_round.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

# Make the display context
main_group = displayio.Group()
display.show(main_group)
display.root_group = main_group

switch_x = 30
switch_y = 30
Expand Down
2 changes: 1 addition & 1 deletion examples/displayio_layout_simpletest.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

# Make the display context
main_group = displayio.Group()
display.show(main_group)
display.root_group = main_group

layout = GridLayout(
x=10,
Expand Down
2 changes: 1 addition & 1 deletion examples/displayio_layout_switch_multiple.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
my_group.append(my_switch8)

# Add my_group to the display
display.show(my_group)
display.root_group = my_group


# Start the main loop
Expand Down
2 changes: 1 addition & 1 deletion examples/displayio_layout_switch_simpletest.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
my_group.append(my_switch)

# Add my_group to the display
display.show(my_group)
display.root_group = my_group

# Start the main loop
while True:
Expand Down
2 changes: 1 addition & 1 deletion examples/displayio_layout_tab_layout_simpletest.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

# create and show main_group
main_group = displayio.Group()
display.show(main_group)
display.root_group = main_group

font = terminalio.FONT

Expand Down
2 changes: 1 addition & 1 deletion examples/displayio_layout_tab_layout_touchtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

# create and show main_group
main_group = displayio.Group()
display.show(main_group)
display.root_group = main_group

font = terminalio.FONT

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def list(self):

# create and show main_group
main_group = displayio.Group()
display.show(main_group)
display.root_group = main_group

# fon.gvars bitmap_font.load_font("fonts/Helvetica-Bold-16.bdf")
font_arial = bitmap_font.load_font("/fonts/Arial-16.bdf")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ def refresh_from_NTP():
# create and show main_group
main_group = displayio.Group() # The Main Display Group

display.show(main_group)
display.root_group = main_group

# font = bitmap_font.load_font("fonts/Helvetica-Bold-16.bdf")
font_arial = bitmap_font.load_font("/fonts/Arial-16.bdf")
Expand Down