File tree 1 file changed +12
-1
lines changed
adafruit_displayio_layout/layouts
1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,9 @@ class TabLayout(displayio.Group):
42
42
"""
43
43
A layout that organizes children into a grid table structure.
44
44
45
+ .. warning::
46
+ Requires CircuitPython version 7.3.0-beta.2 or newer
47
+
45
48
:param int x: x location the layout should be placed. Pixel coordinates.
46
49
:param int y: y location the layout should be placed. Pixel coordinates.
47
50
:param displayio.Display display: The Display object to show the tab layout on.
@@ -167,7 +170,15 @@ def _draw_tabs(self):
167
170
_new_tab_group .append (_tab_label )
168
171
169
172
if i == self .page_layout .showing_page_index :
170
- _tab_tilegrid .bitmap = self ._active_bmp
173
+ try :
174
+ _tab_tilegrid .bitmap = self ._active_bmp
175
+ except AttributeError as e :
176
+ print (e )
177
+ raise (
178
+ AttributeError (
179
+ "TabLayout requires CircuitPython version 7.3.0-beta.2 or newer."
180
+ )
181
+ ) from e
171
182
_tab_tilegrid .pixel_shader = self ._active_palette
172
183
_tab_label .color = self .active_tab_text_color
173
184
self .tab_dict [i ] = _new_tab_group
You can’t perform that action at this time.
0 commit comments