This frame serves as ancestor for other frames that I put on a limited space in the main TForm.
So it is just a user interface base for the other frames.

I need to put many controls inside these frames, because they will handle large database forms.

As the main form has limited space, I need to put a TScrollBox in all the TFrame space except for the title bar. But this covers the backgroud image.

How do I make this ScrollBar to be background transparent?

Or is it better to make a new component with that functionality, and how to do it?

I saw some examples in other sites, but they are buggy at the run-time

Thank You!

Edit2:

I found the TElScrollBox from ElPack from LMD Inovative.
This is background transparent and allow us to put an image as background.
But the same problem occurs: When we scroll it at run-time, it moves the ancestor's background in it's area of effect.

Edit1:

I've tried to make a descendant but the scrollbar only shows when we pass hover the mouse where it should be, and the form's background move inside the scrollbox when we scroll it.
And also, the controls inside of it get some paint errors...

2 Answers
2

f you don't want the image to scroll you will have to roll your own scroller, which is not too difficult (It still raining here in England so I'm bored!)

To test, Create the frame put the image on and alighn to client.
Put a scrollbar on the frame set to vertical and align right.
enlarge the frame at design time.
Put controls on anywhere and then shrink it so some are not visible (below the bottom).
On the main form in form show (for testing), or when you create a new frame call Frame.BeforeShow to do the setup.

For a reason that I cant understand, the vertical scrollbar that appeared on design time, didn't show up at run-time. Also I need to set autoscroll to true to design the controls in the right place, then, switch off the autoscroll.
–
EASIJul 9 '12 at 23:25