Jump to content
Martyn Spencer

TFrame and VCL styles [solved]

Recommended Posts

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 by Martyn Spencer
Added Delphi version

Share this post


Link to post

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

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
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

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

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

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

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
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×