Topic: Color Backgrounds

MVD users--

I have downloaded a few MVD examples. Some of you have some very nice color backgrounds for your screens. Especially Derek. Where do you find a color palette? I have tried hex values. They do not work. I put the values in the properties/BgColor field.
Thanks for all of your help. Background color does make a difference.

scribtx

Re: Color Backgrounds

Hello scribtx

Here is a function calling Color dialog :

function GetColor (CurrColor: integer): integer;
   var ColorDialog: TColorDialog;
begin
  ColorDialog := TcolorDialog.Create(frmSettings);
  ColorDialog.Color := CurrColor;
  if ColorDialog.Execute then
    begin
      result := ColorDialog.Color;
    end;
end;


Other example :

If you want change background color of a grid

On peut entrer la couleur par son code Hexadécimal

Form1.GridSearch.Color := $00DDEEFF;

ou par son nom connu de Windows

Form1.GridSearch.Color := clGreen;

Here you can give Windows colour name or its hexadecimal value.

Here is a link to get all hexadecimal values you're looking for :

http://www.proftnj.com/RGB3.htm

I hope this will help you a bit

JB

3 (edited by derek 2019-12-18 18:40:17)

Re: Color Backgrounds

Hi Scribtx, Hi JB,
If I don't want to use the pre-set colors (clred, clblue, clgreen etc), I click on the bgcolor object property (the very small box circled in the attached screenshot - it's quite easy to miss - LOL!), click on 'define custom colors' and then just choose a color from the palette.
The color value is then copied back into the object's property (in my example $00B6AA85).  You can then simply copy this value and use it elsewhere if required.
All of this holds true not just for form backgrounds but for labels, tablegrid backgrounds, panels etc etc.
Regards,
Derek.

Post's attachments

Attachment icon colour palette.jpg 266.21 kb, 147 downloads since 2019-12-18 

Re: Color Backgrounds

Thanks! Y'all are awesome!

Scribtx


P.S. Go Wolverhampton Wolves! smile