I am trying to change the size of a scatter so it can be same size as the element of the grid i am putting the scatter in.
For that i found that the way to change Scatter size is scale so here what i did :
gridscreen = GridLayout(rows = x-2)
for y in self.listim:
scatt = Scatter()
scatt.scale = 2.5
image = Image(source = y)
scatt.add_widget(image)
gridscreen.add_widget(scatt)
The result is not quiet what i expected, because the size of every Scatter created is good, but the Scatter don't work same as before (before i add scatt.scale = 2.5
) now, not all the Image in the Scatter are connected, especially thoses in the Y axis:
Only translation on x axis are allowed, so it seems that my problem come from scatt.do_translation_y
, but i didn't found a way to solve this problem.
I hope i did explain well my problem.
Thank you for your time ^^
The size of the scatter will be defined by the layout - in your case the GridLayout- so whats left is only to make the image size the same as the scatter - something like this
In the kv file:
In the python file: