S SPLatMan Member Licensed User Longtime User Jul 4, 2014 #1 Hi, I am having trouble getting my app to display a background image. I suspect I am using panels and canvas badly. The attached program illustrates the problem. It is heavily stripped down from my full app. As-is the demo app will display a few buttons and some text on a plain background. If you uncomment line 98 Code: Copy 'MakeBGImage '<<<<<<<<<<<<<<<<<<<<<< Comment out to show the text it will show an image of the reward offered for a solution but the text, and its associated background panel, will vanish. Any suggestions, please? Attachments BackgroundImgChallenge.zip BackgroundImgChallenge.zip 26 KB · Views: 315
Hi, I am having trouble getting my app to display a background image. I suspect I am using panels and canvas badly. The attached program illustrates the problem. It is heavily stripped down from my full app. As-is the demo app will display a few buttons and some text on a plain background. If you uncomment line 98 Code: Copy 'MakeBGImage '<<<<<<<<<<<<<<<<<<<<<< Comment out to show the text it will show an image of the reward offered for a solution but the text, and its associated background panel, will vanish. Any suggestions, please?
klaus Expert Licensed User Longtime User Jul 4, 2014 #2 The probelm in your code is that you add a Panel with an image on the Activity. Then you try to send it to back. Unfortunately a Panel cannot be behind the Activity ! You should change the code to draw the image on the Activity background and draw the text on a Panel. Attached your modified test program. If you want to show and hide the image you could either change the Activity background or draw the image on a Panel and change the Visibility property. Attachments BackgroundImgChallenge_1.zip BackgroundImgChallenge_1.zip 25.3 KB · Views: 320 Upvote 0
The probelm in your code is that you add a Panel with an image on the Activity. Then you try to send it to back. Unfortunately a Panel cannot be behind the Activity ! You should change the code to draw the image on the Activity background and draw the text on a Panel. Attached your modified test program. If you want to show and hide the image you could either change the Activity background or draw the image on a Panel and change the Visibility property.
S SPLatMan Member Licensed User Longtime User Jul 4, 2014 #3 Thank you Klaus. I shall look at that tomorrow. It's dinner time here in Australia Upvote 0