prompter: I'm writing a Python GUI application using the Kivy framework. How can I make the height and the width of a ScrollView automatically be 80% of the window's height and width, rather than a set size?

assistant: You can achieve this by binding the size of the ScrollView to the size of the window using Kivy's Window module. Here's an example code snippet that sets the height and width of the ScrollView to 80% of the window's height and width:

```python
from kivy.app import App
from kivy.core.window import Window
from kivy.uix.scrollview import ScrollView
from kivy.uix.label import Label


class MyScrollView(ScrollView):
    def __init__(self, **kwargs):
        super().__init__(**kwargs)
        self.size_hint = (None, None)  # disable size_hint to allow fixed size
        self.bind(size=self.set_size)  # bind the size to the window size
        self.set_size(Window, Window.size)

    def set_size(self, instance, size):
        self.height = size[1] * 0.8  # set the height to 80% of the window's height
        self.width = size[0] * 0.8  # set the width to 80% of the window's width


class MyApp(App):
    def build(self):
        return MyScrollView(
            size_hint=(None, None),
            pos_hint={'center_x': 0.5, 'center_y': 0.5},
            do_scroll_x=False,
            Label(text='This is a scrollable view'),
        )


if __name__ == '__main__':
    MyApp().run()
```

In this example, the MyScrollView class inherits from ScrollView and overrides its __init__ method to disable the size_hint property and bind the size property to the set_size method. The set_size method sets the height and width of the ScrollView to 80% of the window's height and width, respectively. Finally, the MyApp class sets the size_hint and pos_hint properties of the MyScrollView widget and adds a Label as its child.

prompter: ```py
from kivy.app import App
from kivy.core.window import Window
from kivy.uix.scrollview import ScrollView
from kivy.uix.label import Label


class MyScrollView(ScrollView):
    def __init__(self, **kwargs):
        super().__init__(**kwargs)
        self.size_hint = (None, None)  # disable size_hint to allow fixed size
        self.bind(size=self.set_size)  # bind the size to the window size
        self.set_size(Window, Window.size)

    def set_size(self, instance, size):
        self.height = size[1] * 0.8  # set the height to 80% of the window's height
        self.width = size[0] * 0.8  # set the width to 80% of the window's width


class MyApp(App):
    def build(self):
        return MyScrollView(
            size_hint=(None, None),
            pos_hint={'center_x': 0.5, 'center_y': 0.5},
            do_scroll_x=False,
            Label(text='This is a scrollable view'),
        )


if __name__ == '__main__':
    MyApp().run()
```

assistant: Yes. This is the example code I provided previously. Do you have any questions regarding any particular part of the code?

prompter: Could you explain more about why I am linking these libraries and what they do?
```
from kivy.app import App
from kivy.core.window import Window
from kivy.uix.scrollview import ScrollView
from kivy.uix.label import Label
```

assistant: I'm not sure what you're looking for in an answer.

prompter: Sorry, I thought I had pasted that into IDLE, not here.  Let me test this and I'll be right back.

assistant: No problem, take your time! Let me know if you need any further assistance.

assistant: To make the height and width of a ScrollView automatically be 80% of the window's height and width, you can use the `Window` module from Kivy. Here's an example code snippet that demonstrates how to do this:

```python
from kivy.app import App
from kivy.uix.scrollview import ScrollView
from kivy.core.window import Window

class MyScrollView(ScrollView):
    def __init__(self, **kwargs):
        super(MyScrollView, self).__init__(**kwargs)
        self.size_hint = (None, None)
        self.size = (Window.width * 0.8, Window.height * 0.8)

class MyApp(App):
    def build(self):
        return MyScrollView()

if __name__ == '__main__':
    MyApp().run()
```

In this example, we create a custom `MyScrollView` class that inherits from `ScrollView`. In the `__init__` method, we set the `size_hint` to `(None, None)` to disable the default size hint behavior, and then set the `size` to 80% of the window's width and height using the `Window` module.

Finally, we create a `MyApp` class that returns an instance of `MyScrollView` in the `build` method, and run the app using `MyApp().run()`.