# Background Image of DirectScrolled Frame

Hi,

How can I set the background Image of a DirectScrolledFrame ?

``````frame = DirectScrolledFrame(
image = r"image.png"
)``````

With this code, the Image isnt exactly as big as the scrolled Frame.

Try setting image_pos = (x, 0, z) and image_scale = (xs, 1, zs) to make the image fit the frame.

David

Thank you very much, but how can I get the right scale ( zs and xs ), when I just know the scale of the frame ( 1,1,1 ). How can I get the lenth? Is there a function like getLenth and setLenth?
Or how sould I set the size/scale?

Hmm, you can use frame.getBounds() to return the four corners of the frame, and you might be able to infer the appropriate scale from that. It might take some trial and error.

David