Add an API to set a background image on toga.Box
What is the problem or limitation you are having?
I can't add background behind the box ,can you help me , tell me some skii or function can do that
Describe the solution you'd like
i dont know
Describe alternatives you've considered
thank you
Additional context
thank you
Thanks for the suggestion; as you've noticed, there's no current API for this on toga.Box.
You might be able to implement this on a per-platform basis by accessing box._impl.native, and using the native APIs for each platform.
If we were to add this feature to Toga, we'd need to be able to set an image, as well as the position, tiling and stretch properties. The background-size, background-position and background-repeat CSS properties for a model API for what we would need to support.
One decision to be made is whether this should be implemented as a new styling feature in Pack, or a specific API entry point on toga.Box.
Thank you for your patience Is there has some skill can put box on the images? I want make a APP that on one image have some box you can input and then make respond , now the difficult is the image can't put behind the box.
I don't really understand your description, but as long as you don't need anything to overlap the image, you can display it using the Image and ImageView APIs.
thank you very much, i want make a textinput box and a button overlap the image,
I don't really understand your description, but as long as you don't need anything to overlap the image, you can display it using the
ImageandImageViewAPIs.
thank you very much, i want make a textinput box and a button overlap the image,
OK, in that case I don't have any other suggestions except what @freakboy3742 posted above.
OK, in that case I don't have any other suggestions except what @freakboy3742 posted above. Do you know how to use the box._impl.native , i can't
As you can see byprinting it, the native object will be whatever widget your platform uses to implement Toga's Box. Instructions for using that object can be found in the documentation for the underlying UI toolkit (GTK, Winforms, etc.). But this is outside of the scope of Toga's API, so unfortunately we don't have time to give detailed help.
Just wanted to cast another vote for this.
Especially if also coming with the ability to have the image stretch when the window is resized. Would save a lot of headaches dealing with hacks to make this work now.