    def test_disabled_layout(self):
        """
        Check disabled layout cannot be tabstop.
        """
        # Create a dummy screen.
        screen = MagicMock(spec=Screen, colours=8, unicode_aware=False)
        scene = Scene([], -1)
        canvas = Canvas(screen, 10, 40, 0, 0)

        # Create the form we want to test.
        form = Frame(canvas, canvas.height, canvas.width, has_border=False, can_scroll=False)
        layout = Layout([100])
        form.add_layout(layout)
        text_box = TextBox(1, as_string=True)
        text_box.disabled = True
        layout.add_widget(text_box)
        layout2 = Layout([100], fill_frame=True)
        form.add_layout(layout2)
        text_box2 = TextBox(1, as_string=True)
        layout2.add_widget(text_box2)
        form.fix()
        scene.add_effect(form)
        form.reset()

        # Check that input cannot get focus on disabled layout.
        text_box.value = "A test"
        text_box2.value = "Another test"
        self.process_keys(form, ["A", Screen.KEY_TAB, Screen.KEY_UP, "B"])
        form.save()
        self.assertEqual(text_box.value, "A test")
        self.assertEqual(text_box2.value, "Another testAB")
Check disabled layout cannot be tabstop.
tests/test_widgets.py