1

I use TFrames. I make them dynamically by adding them to the Form window. I chose the style called "Glow" (others also). I launched the program and the style works only on the main Form window, they do not work on the controls TFrame. Why?

I tried to add: TStyleManager.SetStyle for the Frame Form but with no effect.

Danilo Casa
  • 506
  • 1
  • 9
  • 18
Mohammad
  • 31
  • 1
  • Please provide an MCVE so that we know what you are doing and can reproduce. – David Heffernan Aug 17 '15 at 19:19
  • http://i.imgur.com/rKF7HKj.png – Mohammad Aug 17 '15 at 19:34
  • No. Please don't post off site links. Please post an MCVE as I requested. – David Heffernan Aug 17 '15 at 19:36
  • @David Heffernan what do you mean? Can you explain MCVE shortcut? – Mohammad Aug 17 '15 at 19:38
  • Please use a websearch to find out what it means. – David Heffernan Aug 17 '15 at 19:39
  • ah, so you mean an example code? – Mohammad Aug 17 '15 at 19:40
  • Yes. One that can be compiled if at all possible, and one that is minimal. – David Heffernan Aug 17 '15 at 19:45
  • So you never used FRAMES in Delphi? http://pastebin.com/CW5wAAHW also you can add an frame manually, drag & drop, same effect and same problem with skin. Rest things you know, i have used one skin (project options menu) and thats all. I have checked which skin is used on Frame and same as main Form, so Skin should work but do not work. Maybe frames are bugged in delphi? If you want to add an Frame t your new project, use File -> New... -> Other -> VCL Frame – Mohammad Aug 17 '15 at 19:47
  • Please edit the question to include thee mcve. – David Heffernan Aug 17 '15 at 19:48
  • The bug is really common, @David. I've also met it on XE5 (FMX Metropolis project). Moreover. It appears irregularly. If you open another form in the project that contains a control with the same style it is displayed properly. when you open (without terminating the current project) the faulty frame-containing form it starts showing conrols with proper style as well. In my case manual explict runtime setting of styles can help but not in all cases (for instance with odd TabItems only). It seems, that it appears in scroll forms (with HorzScrollBar and Form.Width>Screen.Width) – asd-tm Aug 17 '15 at 19:49
  • I spend quite a lot of time answering questions here. I know how it works. Make an MCVE, and you'll get good answers. – David Heffernan Aug 17 '15 at 19:53
  • @asd-tm thanks. So what should I do? (details?) – Mohammad Aug 17 '15 at 19:54
  • You say "I make them dynamically by adding them to the Form window" and what David is asking is for you to show us this code so that we may know what's wrong about it. – Jerry Dodge Aug 17 '15 at 19:57
  • I have not found the answer. Add details, requested by @David-Heffernan. – asd-tm Aug 17 '15 at 19:59
  • If you allow me to use answer field I shall explain how to reproduce it in a minute-two – asd-tm Aug 17 '15 at 20:03
  • @asd-tm and David Heffernan maybe i found bug (not sure). Probably once I set Frame Form Color and restore clBtnFace and maybe that is a bug. How to "delete" Color? Maybe delphi remember "he changed color manually so he dont want a Style on this Frame form window"? – Mohammad Aug 17 '15 at 20:13
  • @asd-tm btw. now im sure, the bug is Form Color, i have added new Frame and run application, Style was OK, and then i have changed Frame Form Color to random color and restore default color (color form field: ctrl + v, clBtnFace) and then i run program again and I saw BUG lol, so delphi is retarded? and he remember change of frame form color property and he making a bug... Wtf? Its stupid. How to "reset" Frame Form Color property other than manually ctrl + v? (because manually color change will make a bug) – Mohammad Aug 17 '15 at 20:27
  • so problem solved. Thanks all for the help. – Mohammad Aug 17 '15 at 20:43

1 Answers1

0

I have fixed this bug. If you will change Frame Form Color property manually, it will make a bug. You must select your Frame and go to properties and turn on the ParentBackgroud field (choose true) and you can also turn on the ParentColor too. Now Styles must work.

Mohammad
  • 31
  • 1
  • Please, add details of what you've done and what was actually the issue to help the community. – asd-tm Aug 17 '15 at 20:55
  • So as I said, if user will add TFrame (File -> New... -> Other -> VCL Frame) and then if he will change the Color Form (i mean that TFrame Form), then it will make a bug, Styles will not work for this Frame. To fix that, just set the "True" of ParentBackground (property of Form in TFrame window) etc. Now you understand? Color makes a bug, if you never change Form Color then you do not have to worry about. Just changing Form Color == Bug, and you know now how to fix it, just set the true ParentBackground of Form, thats all. Btw. my EN is poor, but i dont h've time now to use google translate – Mohammad Aug 17 '15 at 21:51
  • Mohammad, @David-Heffernan, I was writing my comments on alike problems in FMX projects. Unfortunately, this solution does not suit these cases as FMX TFrame ascendants do not have such property. The bug appears without setting any colors manually. – asd-tm Aug 18 '15 at 08:20
  • On your form, set the parent of that frame to have DoubleBuffered = fasle; Man! Embarcadero will never ever fix the skins (styles)! – Gabriel May 06 '21 at 20:42