I have a sort of note-taking app I’m putting together. It has a horizontal BoxLayout which contains an image and another BoxLayout (which happens to be vertical). This embedded BoxLayout contains a TabbedPanel.
I want to change the image in the main BoxLayout whenever the user selects a different tab in the embedded BoxLayout.
I’m not sure what to do in the on_release() method of each TabbedPanelItem in order to get the different images to display.
Currently I have the layout working the way I want up to the point of displaying the image for the first (default) tab.
Here is my code:
- main.py
- layouttest.kv
In the KV code, I have set the source of the Image to app.leftImage. In the 3 on_release() handlers, I set app.leftImage to the correct image. But that doesn’t change what is displayed.
There is probably something simple that I am not understanding, but I am new to Kivy programming, so please answer with sufficient detail for a newbie to grasp.