I'm wanting to change my StaticText font colour from black to clBlue. How can I go about this?
Currently I'm doing
StaticText.Font.Color := clBlue;
but that is making no difference to the colour.
What can I do? Thanks!
The TStaticText control is a wrapper around the Win32 STATIC control. When themes are enabled, the system ignores the font color that is specified, and uses the color specified by the theme. Other standard system controls behave in this manner too.
If you want to be able to specify the color of the text, you will need to use a different control. For instance, TLabel.
Set the static text Transparent property to False
Related
Using Delphi 10.2.3: I have a splash screen form that's created and displayed in the app's main-form unit's initialization section. The form contains a bitmap background with some labels on it for title, copyright, version, build date and initialization status, ParentFont is off for the form and the labels, and the label's font name, size and color are all set at design time to a good contrast for the bitmap background.
In the main form's constructor, the user's choice of style is read from the config and set using TrySetStyle(). But this can change the font color on that splash screen form, which I don't want. I've turned off all the StyleElements for both the form and the labels, but that has no effect.
How can I prevent the change of style from affecting the splash form?
I can change the appearance of VCL buttons by using the bit map stile designer with specifying a bitmap to [Objects]-[Button]-[Face]-[Bitmap].
So I tried to change the VCL panel's appearance in the same way with [Objects]-[Panel]-[Frame]-[Bitmap] and [Objects]-[Panel]-[FrameNoCaption]-[Bitmap].
The test dialog shows that buttons are rendered in an expected way, but panels are not.
How can I apply a VCL style to a TPanel?
I am modifying the Dark Firemonkey style in XE6 which has a light orange glow around each component. I can individually change the color of the glow manually in each component type but its tedious as there are many different types of components, buttons, edit boxes etc. Is there any way to change the color of the glow in all components simultaneously in the style editor (other than programmatically)?
I am using XE6. The screen shot below shows the glow around the memo box.
I would like to change the colour of a button, for example make it from grey --> yellow. Do you know if this is possible? I didn't see any colour option in the button's property, but there must be a way to change its colour.
If it is not possible, please tell me if and how i can change the colour of button's caption. I have selected different colours, but it still hasn't changed, it remains black, perhaps i am doing something wrong.
I am using delphi7 btw
for change font color of button , in project->option->application->Appearance use custom style for project
and then in button styleelements property disable sefont
How can I add a background image to my delphi form? I added a TImage, but now the labels aren't visible any more, and the texts of my checkboxes are in a blue "box" (blue is the background color i chose). This blue doesn't look very good on the background image, and the hidden labels also don't look good. How do I fix these problems?
For the labels: make sure that they are transparent (Transparent property in the Object Inspector), and that they are on top of the TImage in the Z-order of controls. To correct this you can execute the "Send to back" command on the TImage component in design mode, it will make all other non-windowed controls appear on top of it.
For the checkboxes I don't know what the problem in your case is, in Delphi 2007 checkboxes appear properly transparent when put over a TImage. Maybe you use an earlier Delphi version? If so it would be good to mention this in the question. There may also be a different behaviour depending on whether themes are active. Again, hard to say without further information.
Move the TImage to the back of the form (right click, order -> send to back).
For labels, set the Transparent property to true. For checkboxes and radio buttons, at least in Delphi 6 which is all I have access to, there is no transparent property. The way round this is to reduce the controls label to zero size and the provide your own additional TLabel, which can be transparent.
Can I also say that I find windows with background images ultra naff, and I know I'm not alone in this.