Martyn Spencer 0 Posted May 5, 2020 (edited) I been working on a VCL styled application developed initially by someone else and have just started using TFrames to rationalise some of the UI. It would appear that TFrames do not support VCL styles. Is this so? The main frame background appears to be rendered in whatever colour is set as the TFrame "Color" property. I am using Delphi 10.2. Edited May 5, 2020 by Martyn Spencer Added Delphi version Share this post Link to post
Anders Melander 1784 Posted May 5, 2020 Assuming you've not already done the obvious and googled "delphi tframe styles", have you made sure that ParentBackground=True on the frame? Share this post Link to post
Martyn Spencer 0 Posted May 5, 2020 Hi Anders. I did do a search before posting - I always do. I found some links that should allow the frame background to be transparent, but this simply caused there to be corrupted graphics where the frame background should be. Setting ParentBackground to True has no effect. The TFrame picks up the background that's set at design time and ignores the theme selection. One thing I have not tried is setting ParentBackground and attempting the use of transparency, so I'll give this a go. Share this post Link to post
Anders Melander 1784 Posted May 5, 2020 5 minutes ago, Martyn Spencer said: Setting ParentBackground to True has no effect Okay. I've never used VCL styles so I have no other suggestions. Share this post Link to post
Martyn Spencer 0 Posted May 5, 2020 Do you use a different styling system at all? I ask because I generally think that VCL styles look pretty darned ugly in most instances. Share this post Link to post
Anders Melander 1784 Posted May 5, 2020 I use DevExpress and I'm semi-satisfied with it. Besides the occasional update for new ribbon styles they rarely add new skins and some skins can be a real challenge to use. Many skins have problems with white text on white background with certain parent/child control combinations (or grey text on black background for the dark skins). Share this post Link to post
Martyn Spencer 0 Posted May 5, 2020 Thanks Anders. I have seen their skinning controls and they do seem better than the VCL themes (imo). I am having trouble finding something that offers consistently reliable and attractive themes, but that's probably not for this thread. Appreciate you taking the time to respond. Share this post Link to post
Uwe Raabe 2057 Posted May 5, 2020 I usually place a client aligned TPanel onto every TForm and TFrame with all borders removed and ParentBackground set to False. That way all forms and frames are drawn with the current styles panel color, which is usually the same as the form color. Share this post Link to post
Martyn Spencer 0 Posted May 5, 2020 Thanks Uwe. I will give that a go to see if it works. Share this post Link to post
Martyn Spencer 0 Posted May 5, 2020 12 minutes ago, Uwe Raabe said: I usually place a client aligned TPanel onto every TForm and TFrame with all borders removed and ParentBackground set to False. That way all forms and frames are drawn with the current styles panel color, which is usually the same as the form color. Works just fine, thanks 🙂 Share this post Link to post